Created
January 16, 2013 06:56
-
-
Save tiernano/4545178 to your computer and use it in GitHub Desktop.
post-receive hook for GIT to generate site using Jekyll and then push to NFSN using RSYNC. dont forget the / at the end of public_www or a new directory will be created in your public folder... if you want the contents uploaded to the public folder, include the /!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_REPO=$HOME/repositories/<sitename>.git | |
TMP_GIT_CLONE=$HOME/tmp/<sitename> | |
PUBLIC_WWW=/var/wwwsites/<sitename>/ | |
git clone $GIT_REPO $TMP_GIT_CLONE | |
cd $TMP_GIT_CLONE && jekyll --no-auto $TMP_GIT_CLONE $PUBLIC_WWW | |
cd ~ && rm -rf $TMP_GIT_CLONE | |
rsync -avz -e ssh $PUBLIC_WWW <NFSNUSERNAME>@ssh.phx.nearlyfreespeech.net:/home/public/ | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment