Setup gatsby on github pages main site

March, 30, 2018

Create new repo with the name <username>/github.io and add it as origin.

Start in master branch.

Create a new branch and push it to github:

git checkout -b development
git push origin development

Fetch gh-pages branch from github

git fetch --all
git checkout gh-pages

Delete old master locally and remote and create it from gh-pages

git branch -d master
git push --delete origin master
git checkout -b master
git push origin master

Now your website should be accessible from .github.io

Change your default branch in github settings to development

Now all your development should me done in the development branch

When you want to update it then

npm run deploy
git fetch --all
git merge gh-pages master
git push origin master

Previous: Phoenix routes setup