Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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