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:
Executable
+18
@@ -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; }
|
||||||
Reference in New Issue
Block a user