Skip to content

Instantly share code, notes, and snippets.

@tisseurdetoile
Created April 12, 2015 10:52
Show Gist options
  • Save tisseurdetoile/5c7c11b54a3e3e4bbed2 to your computer and use it in GitHub Desktop.
Save tisseurdetoile/5c7c11b54a3e3e4bbed2 to your computer and use it in GitHub Desktop.
Hook in git repo for jekyll auto publish
#!/bin/bash -l
GIT_REPO=/opt/git/blog.git
TMP_GIT_CLONE=/tmp/awesomeblog
PUBLIC_WWW=/usr/share/nginx/www/jekyll/
git clone $GIT_REPO $TMP_GIT_CLONE
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