myadhd/deploy.sh
djg 911163c633
Some checks are pending
Build and Deploy / deploy (push) Waiting to run
initial import: static site + CI pipeline
2026-09-21 22:38:56 +00:00

18 lines
760 B
Bash
Executable file

#!/usr/bin/env bash
# Build (nothing to build yet — site is static) + sync docroot in place.
set -euo pipefail
cd "$(dirname "$0")"
BASE=/home/opc/zai-home-base
mkdir -p "$BASE/sites/myadhd.dev"
rsync -a --delete site/ "$BASE/sites/myadhd.dev/"
echo "==> verifying through Traefik (origin)"
sleep 1
code=$(curl -sk -o /dev/null -w '%{http_code}' --resolve myadhd.dev:443:127.0.0.1 https://myadhd.dev/ --max-time 10)
echo " https://myadhd.dev -> $code (origin)"
for asset in /static/style.css /static/app.js /static/favicon.svg /robots.txt /sitemap.xml; do
out=$(curl -sk -o /dev/null -w '%{http_code} %{content_type}' --resolve myadhd.dev:443:127.0.0.1 "https://myadhd.dev$asset" --max-time 10)
echo " $asset -> $out"
done
echo "==> deploy complete"