Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 /!
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
You can’t perform that action at this time.