Another way to approach this problem is to use travis-ci. Travis already comes with a full stack of ruby/go/node/python working that you can take advantage of to do any arbitrary commands on `git push`.<p>Just set the language to ruby, change your test command to a script that performs `jekyll build && rsync`, then encrypt any credentials using travis encryption keys (<a href="http://docs.travis-ci.com/user/encryption-keys/" rel="nofollow">http://docs.travis-ci.com/user/encryption-keys/</a>).<p>Here's one article that takes advantage of this exact setup to automatically deploy to a gh-pages repo: <a href="https://medium.com/@nthgergo/publishing-gh-pages-with-travis-ci-53a8270e87db" rel="nofollow">https://medium.com/@nthgergo/publishing-gh-pages-with-travis...</a>