Skip to content

Instantly share code, notes, and snippets.

@gre
Created May 7, 2014 21:02
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 gre/8627af4ddd782ab99325 to your computer and use it in GitHub Desktop.
Save gre/8627af4ddd782ab99325 to your computer and use it in GitHub Desktop.
Jekyll post-receive script
GIT_REPO=$HOME/repo
TMP_GIT_CLONE=$HOME/tmp/myrepo
PUBLIC_WWW=/var/www/repo
if [ ! -d "$TMP_GIT_CLONE" ] ; then
rm -rf $TMP_GIT_CLONE
git clone $GIT_REPO $TMP_GIT_CLONE
else
cd $TMP_GIT_CLONE
git pull
fi
cd $TMP_GIT_CLONE
jekyll build -d $PUBLIC_WWW
cd -
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment