#!/usr/bin/env bash set -eu cd "$(dirname "$0")/.." # Upload homepage cd static scp homepage.html root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/index.html # Build notes cd ../scripts rm -Rf ../_gen/notes WATCH_AND_REBUILD=0 python3 generate.py ~/.logs/brain ../_gen/notes rm -Rf ../_gen/blog WATCH_AND_REBUILD=0 python3 blog.py ~/cloud/nextcloud/blog/posts/ ../_gen/blog # Upload notes cd ../_gen rsync -HPaz static/ --delete-after --exclude='*.html' root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/static/ rsync -HPaz notes/ --delete-after --exclude='xapian' --exclude='*.sqlite3' root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/notes/ rsync -HPaz notes/db.sqlite3 root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar-api/ rsync -HPaz blog/ --delete-after --exclude='xapian' --exclude='*.sqlite3' root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/blog/ # Restart API server ssh root@codigoparallevar.com docker restart notes-api-server