Files
L'électron rare 1e8826dbee feat: add blog deploy script
Automate publishing the Hugo blog to the nginx host on Tower: build
with hugo --minify, rsync the public/ output to bus-blog, then smoke
test the public HTTPS URL to confirm the route is live end-to-end.
2026-07-09 11:35:39 +02:00

19 lines
510 B
Bash
Executable File

#!/usr/bin/env bash
# Publish the blog to Tower (nginx :8090 -> https://bus.saillant.cc)
set -euo pipefail
cd "$(dirname "$0")"
TOWER="clems@192.168.0.120"
DEST="/home/clems/bus-blog/public/"
echo "==> hugo build"
hugo --minify --cleanDestinationDir
echo "==> rsync to $TOWER:$DEST"
rsync -az --delete public/ "$TOWER:$DEST"
echo "==> smoke test"
curl -sfI https://bus.saillant.cc/ >/dev/null \
&& echo "OK: https://bus.saillant.cc" \
|| { echo "WARN: public URL not reachable (DNS/route?)"; exit 1; }