Skip to content

Instantly share code, notes, and snippets.

@mhansen
Created January 28, 2010 00:51
Show Gist options
  • Save mhansen/288316 to your computer and use it in GitHub Desktop.
Save mhansen/288316 to your computer and use it in GitHub Desktop.
post-update hook on my jekyll blog repo
#!/bin/sh
# there really should be an easier way to get files out of a git repo
mkdir /tmp/jekyll-blog 2> \dev\null
git --bare --git-dir=/home/Moon/jekyll-blog.git archive master | tar xC /tmp/jekyll-blog
#compile the site to html
/var/lib/gems/1.8/bin/jekyll /tmp/jekyll-blog /home/Moon/www/markhansen.co.nz
rm -rf /tmp/jekyll-blog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment