Skip to content

Instantly share code, notes, and snippets.

@gre gre/post-receive
Created May 7, 2014

Embed
What would you like to do?
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
You can’t perform that action at this time.