Skip to content

Instantly share code, notes, and snippets.

@simonjodet
Created June 25, 2012 14:10
Show Gist options
  • Save simonjodet/2988870 to your computer and use it in GitHub Desktop.
Save simonjodet/2988870 to your computer and use it in GitHub Desktop.
Blog post-receive hook
git push github master # I have setup a "github" remote on my /var/www/blog_repo/ repository in order to push my commits to github automatically with this line
cd /var/www/blog/ # Change directory to hosted sources
env -i git pull origin master # Pull commits from "origin" remote (/var/www/blog_repo/) into /var/www/blog/
export PATH="/var/lib/gems/1.8/bin/:$PATH" # Make sure gems are available for jekyll
jekyll --no-auto # Generage blog
php search_indexer/search_indexer.php # Update search index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment