Hosting With Github Pages

Written by Stephen Pearce

I’m now hosting on Github Pages. This is good since I now no longer need a VPS. Let me just say though, the setup was a lot more complicated than it needed to be.

Github Pages hosts from the master branch. This was confusing at first because I expected to have my codebase in there. My solution involved creating a work branch called development, then pushing Wintersmith’s generated static markup to master with git’s subtree feature.

This resulted in the following which I now have in a bash alias for convenience:

git push origin `git subtree split --prefix dist`:master --force

It’s not a pretty deployment strategy, but it works.