#!/usr/bin/env bash # Auto-deploy path run by .forgejo/workflows/deploy-site.yml inside the # self-hosted runner — which is forge-runner-01, the actual web server. # Same effect as deploy.sh but without the SSH hop: everything is local. # # Requires `rsync` and `hugo` on PATH. The workflow apk-installs both # before invoking this script. set -euo pipefail HERE="$(cd "$(dirname "$0")" && pwd)" SRCROOT="${FURTKA_SRCROOT:-/srv/furtka-site}" WEBROOT="${FURTKA_WEBROOT:-/var/www/furtka.org}" echo "==> rsync website/ → $SRCROOT" rsync -az --delete \ --exclude='.hugo_build.lock' \ --exclude='public/' \ --exclude='resources/' \ --exclude='deploy.sh' \ --exclude='deploy-ci.sh' \ "$HERE/" "$SRCROOT/" echo "==> hugo build → $WEBROOT" cd "$SRCROOT" hugo --minify --cleanDestinationDir -d "$WEBROOT" echo "OK: deployed to https://furtka.org/"