- Create files
- Checkout gh-pages branch
git checkout gh-pages
- Update gh-pages from master
git rebase master
- Push to the gh-pages branch:
git push origin gh-pages
More information in this blog post and on Github
If you need to deploy a subfolder, use the git subtree push
command as documented here