Deploying Hyde static sites with a simple script

Posted: Feb 13, 2013

A quick little script that can deploy a Hyde site.

At some point it would be nice to be able to deploy bu simply doing a git push to somewhere, but I decided to start with the simplest thing that could possibly work. It's a simple shell script that instructs hyde to regenerate the whole site to a clean directory, using my normal settings (defined in site.yaml) but with production mode on.

deploy.sh and production.yaml should be placed in the site directory (the one that contains content, layout, etc). Of course you'll have to adjust the user and server in the rsync command to match your host.

Note that rsync uses the -c (checksum) option to rsync. This takes longer, but it makes rsync only transmit (and print the names of) files that actually changed. Normally it relies on the timestamp, but hyde gen -r recreates all files, so they all have a new timestamp on every deploy.