#!/bin/sh set -e export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin WORK=/home/git/build/sites cd "$WORK" python3 _shared/build.py . for SITE in irc.gumx.cc vpn.gumx.cc mail.gumx.cc pgp.gumx.cc wk.fo twt.gumx.cc files.gumx.cc demo.gumx.cc list.gumx.cc; do if [ -d "$SITE" ]; then WEBROOT="/var/www/$SITE" mkdir -p "$WEBROOT" case "$SITE" in irc.gumx.cc) # bots/ is managed by irc-bots repo rsync -rlptD --delete --exclude='/fonts' --exclude='/bots/' "$SITE/" "$WEBROOT/" ;; twt.gumx.cc) # twtxt.txt is written by alfred/twt.sh, not tracked in this repo rsync -rlptD --delete --exclude='/fonts' --exclude='/twtxt.txt' "$SITE/" "$WEBROOT/" ;; demo.gumx.cc) # no-style-please/ is managed by zola-no-style-please repo; demos.json is a source file # /ccc/ and /styles/ are managed by ccc repo hook — do not delete rsync -rlptD --delete \ --exclude='/fonts' \ --exclude='/no-style-please/' \ --exclude='/demos.json' \ --exclude='/ccc/' \ --exclude='/styles/' \ "$SITE/" "$WEBROOT/" ;; *) rsync -rlptD --delete --exclude='/fonts' "$SITE/" "$WEBROOT/" ;; esac mkdir -p "$WEBROOT/fonts" rsync -rlptD fonts/ "$WEBROOT/fonts/" cp _shared/favicon.svg "$WEBROOT/favicon.svg" cp _shared/404.html "$WEBROOT/404.html" fi done chmod +x /var/www/wk.fo/pks/cgi-bin/pgp-hkp.sh || true chmod +x /var/www/pgp.gumx.cc/cgi-bin/pgp-hkp.sh || true # 404 page for sites outside this hook cp _shared/404.html /var/www/gumx.cc/404.html || true cp _shared/404.html /usr/share/webapps/cgit/404.html || true echo "sites deployed"