Skip to content

Instantly share code, notes, and snippets.

@toke
Created February 9, 2012 17:13
Show Gist options
  • Save toke/1781256 to your computer and use it in GitHub Desktop.
Save toke/1781256 to your computer and use it in GitHub Desktop.
Update the website via jekyll
#!/bin/sh
REPPATH="/home/user/git/localgitrepository"
DEPLOYTARGET="/var/www/sites/mydomain"
LIVEURL="http://mydeploydomain.tld"
if [ -d ${REPPATH} ] ; then
cd "${REPPATH}"
git pull
jekyll --url "${LIVEURL}"
rsync -rXogpEAt _site/ "${DEPLOYTARGET}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment