Hacker News new | ask | show | jobs
by rstacruz 4272 days ago
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`.

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 (http://docs.travis-ci.com/user/encryption-keys/).

Here's one article that takes advantage of this exact setup to automatically deploy to a gh-pages repo: https://medium.com/@nthgergo/publishing-gh-pages-with-travis...

1 comments

For the record Travis is not the only option in town, you can use [wercker](http://wercker.com/) or [Bitrise](http://www.bitrise.io/) too. There's even a tutorial on [how to publish middleman based sites/blogs](http://devcenter.bitrise.io/tutorials/middleman-project.html) on Bitrise - though Bitrise is currently an iOS CI/CD focused service but generally speaking it's a PaaS with OS X virtual machines.