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.
This commit is contained in:
L'électron rare
2026-07-09 11:35:39 +02:00
parent b6467dacc9
commit 1e8826dbee
Executable
+18
View File
@@ -0,0 +1,18 @@
#!/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; }