Jekyll Script

Speaking of jekyll, there’s a way to get git to publish using post-commit hooks, but I like running a little script to do it. It just runs jekyll to build the site, then calls rsync to make it live (it connects to the server over ssh).

#!/bin/sh

echo "running jekyll"
jekyll --no-auto
echo "rsyncing site with blog server"
cd _site && rsync -Cavz --delete . example.com:/var/www/blog.example.com
echo "done"

That’s it…

You should follow me on Twitter: @patrickxb