#!/usr/bin/env bash # Manual deploy of furtka.org to forge-runner-01. # Rsyncs the Hugo source up to the VM and builds it in-place. # # Normal path is now the `Deploy site` Forgejo workflow, which auto-fires # on every push-to-main that touches website/** — see # .forgejo/workflows/deploy-site.yml. Keep this script for out-of-band # pushes (testing from a local branch, recovering from a CI outage, # whatever). The in-CI equivalent that skips the SSH hop is deploy-ci.sh. set -euo pipefail HOST="${FURTKA_HOST:-forge-runner}" SRCROOT="/srv/furtka-site" WEBROOT="/var/www/furtka.org" HERE="$(cd "$(dirname "$0")" && pwd)" echo "→ rsync website/ to $HOST:$SRCROOT" rsync -az --delete \ --exclude='.hugo_build.lock' \ --exclude='public/' \ --exclude='resources/' \ "$HERE/" "$HOST:$SRCROOT/" echo "→ build on $HOST" ssh "$HOST" "cd $SRCROOT && hugo --minify --cleanDestinationDir -d $WEBROOT" echo "OK: deployed to https://furtka.org/"