Earlier I wrote about using Git and its post-receive hooks for deployment. After using this configuration for six months, I’ve concluded that it’s unnecessarily complicated for my requirements. Scott Kyle and Ben Vinegar agree.
Using such a configuration makes perfect sense for projects residing on GitHub. The repository already exists, and it’s a complimentary service that you don’t have to configure.
In future, when someone asks me how they should deploy Jekyll, I will recommend using a Rakefile and rsync.
$ rake deploy
Thanks to Scott Kyle for sharing his Rakefile.
Wolfgang König brought to my attention that you can exclude files from being copied in the build using the exclude option. I’ve appended this to _config.yml.
exclude: ['Rakefile', 'README.markdown']
Tate Johnson is a 23 year old Ruby on Rails developer and university student living in Brisbane, Australia. He enjoys riding bicycles, motorbikes, taking photos and travelling.