254db67055
Per Codex. Shared deploy/sync-static.sh used by both publish scripts: sync new hashed chunks first WITHOUT pruning old ones (grace window so in-flight/old clients keep chunks they still need), then other assets, then index.html, then service-worker.js last — so a new shell never appears before its chunks exist. Old immutable chunks pruned after 14 days to bound disk growth. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
18 lines
691 B
Bash
Executable File
18 lines
691 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Frontend-only publish: build the SvelteKit static site and sync it to the live
|
|
# Caddy site root. Use this for UI/CSS/copy tweaks — it skips the API container
|
|
# rebuild and Caddy reload that publish.sh does (those only matter for backend
|
|
# changes). For backend/API changes, use publish.sh instead.
|
|
set -euo pipefail
|
|
|
|
repo="$(cd "$(dirname "$0")/.." && pwd)"
|
|
site="/home/jay/srv/sites/upbeatbytes"
|
|
|
|
echo "→ building frontend"
|
|
( cd "$repo/frontend" && npm run build )
|
|
|
|
echo "→ syncing static site to $site (assets first, shell + SW last)"
|
|
bash "$repo/deploy/sync-static.sh" "$repo/frontend/build" "$site"
|
|
|
|
echo "✓ Published frontend → https://upbeatbytes.com"
|