Publish With Github

If everything works as intended you can send push requests to our github repo and it'll get automagic deployed if we merge it.

Publishing from github is easy. You just need to set a small php page up which invokes a script to update the git repo and add the url of your php script in "web hooks" at github.

The php file:

$ cat update.php

and the update script:

$ cat
#the logfile
datestr=$(date +%Y%m%d_%H%M%S)

#cd to your git repo
cd /home/username/blog/

echo git >> $LOGFILE
git pull >> $LOGFILE

#Load bash_profile for jekyll
. /home/username/.bash_profile

#build page
echo jekyll >> $LOGFILE
jekyll build -d /var/www/virtual/username/html >> $LOGFILE

This replace the post-receive git hook. And will do the same work.