- Two branches are in play, the
masterbranch that has the source code, and thegh-pagesbranch that has the build code - They must be kept apart at all times
- Stop at 'Use a custom domain'
- Don't use the pre-deploy script (causes bugs)
- Create new branch off of master
- Use working_up4movement_master folder on computer
(or pull from master on github and branch from that - this approach probably requires
git ito setup node_modules)
-
Test all local changes by running development ->
jekyll serve+ look at localhost:4000 -
When happy, then save all files, commit and push branch to branch with same name on Github
-
Create pull request between that branch and Master (default)
- merge them
---- production build -----
NB: The _site folder continuously regenerates itself, but you can try a manual jekyll build command otherwise (do this on a separate branch as there have been unalterable bugs from this command earlier).
-
npm run deploy(from the branch you finished working on) runs the script that deploys the_sitefolder togh-pagesbranch, which is what the site is running on (must runjekyll buildorjekyll servefirst to generat_sitefolder) NB: Haven't had bugs withnpm run deploy, but if there are, then the local master branch is working and I can pull from master (the latest changes) and runnpm run deployfrom there -
For some reason, after every deploy to
gh-pages, Github usually re-publishes the site toup4movement.github.io, so visiters to the site get 404 errors.
- Under 'settings' of the repo, click on Pages tab on the bottom left and type in
up4movement.comin the Custom domain field and click Save. The site is up again in 2 seconds.