Skip to content

Instantly share code, notes, and snippets.

@yoel-zeldes
Last active December 3, 2018 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoel-zeldes/7fee989b3798f070af9f520785d65cdd to your computer and use it in GitHub Desktop.
Save yoel-zeldes/7fee989b3798f070af9f520785d65cdd to your computer and use it in GitHub Desktop.
#!/bin/sh
while read local_ref local_sha remote_ref remote_sha
do
if [ "$remote_ref" = "refs/heads/source" ]
then
echo 'pushing output folder (production version) to master...'
pelican content -o output -s publishconf.py
echo anotherdatum.com > output/CNAME
ghp-import output
git push --no-verify git@github.com:yoel-zeldes/yoel-zeldes.github.io.git gh-pages:master
pelican content -o output
fi
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment