Skip to content

Instantly share code, notes, and snippets.

@markoa
Created January 24, 2010 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markoa/285289 to your computer and use it in GitHub Desktop.
Save markoa/285289 to your computer and use it in GitHub Desktop.
Example git post-receive hook for a Jekyll web site repository
#!/bin/sh
#
# A hook script for the git post-receive event of a Jekyll web site's repository.
# It needs to unset the GIT_DIR environment variable which is otherwise fixed
# to siterepo/.git. Remember to chmod +x post-receive.
echo "Running post-receive hook..."
cd /var/siteroot && env -i git pull && jekyll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment