Skip to content

Instantly share code, notes, and snippets.

@brittharr
Created March 2, 2016 20:37
Show Gist options
  • Save brittharr/bc328006c0360b3c6609 to your computer and use it in GitHub Desktop.
Save brittharr/bc328006c0360b3c6609 to your computer and use it in GitHub Desktop.
git post-receive hook for jekyll
GIT_REPO=$HOME/repo.git
TMP_GIT_CLONE=$HOME/tmp/repo
PUBLIC_WWW=/var/www/html
git clone $GIT_REPO $TMP_GIT_CLONE
cd $TMP_GIT_CLONE
bundle install
bundle exec jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment