Last active
August 29, 2015 14:21
-
-
Save mseri/9e0c5f1c4d3fa7ac2ba4 to your computer and use it in GitHub Desktop.
Pelican blog publish script
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
#!/usr/bin/env bash | |
#set -euf -o pipefail | |
set -ef -o pipefail | |
echo "Activate Virtual Environment" | |
source venv/bin/activate | |
echo "Generate website" | |
cd struct | |
pelican content -o output -s publishconf.py | |
echo "Publish changes" | |
cd output | |
git add . | |
git commit -m "Blog update - `date`" | |
git push | |
deactivate | |
echo "Site published" | |
echo "Wait 30 sec then push sitemap to google" | |
sleep 30 | |
wget -q --delete-after http://www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2Fwww.mseri.me%2Fsitemap.xml | |
echo "sitemap submitted" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment