From 1e8826dbeea4d6aaaf884c664514bf3672420eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=27=C3=A9lectron=20rare?= <108685187+electron-rare@users.noreply.github.com> Date: Thu, 9 Jul 2026 11:35:39 +0200 Subject: [PATCH] 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. --- blog/deploy.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 blog/deploy.sh diff --git a/blog/deploy.sh b/blog/deploy.sh new file mode 100755 index 0000000..69eeb34 --- /dev/null +++ b/blog/deploy.sh @@ -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; }