Deploy both the source and built site to Github Pages
This gist shows an example of how to mantain both the source (stenciljs example) and the built files of your site in the 'source' and 'master' branch, respectively, in order to deploy the site to Github Pages.
Why this is useful?
I wanted to deploy my personal site to my
dellos7.github.io Github repo. However, in order to publish the site with Github Pages from your main Github pages repo (this is,
<whatever>.github.io), it is a must from GH Pages to deploy it from the
master branch.. So it is very difficult to easily mantain both the source and the built files for your site (I am talking about the
www folder) in the same repo if you want to deploy it with GH Pages.
So with this method you are able to (thanks to git worktrees):
- Have a
sourcebranch where you will push the source code of your site (in this example, the source files and folders of the site generated with Stencil).