#!/bin/bash # Build frontend and deploy to static/ — run from MosswartOverlord root set -e echo "Building frontend..." cd frontend && npm run build && cd .. echo "Syncing build output to static/..." rm -rf static/assets/ cp static/_build/index.html static/index.html cp -r static/_build/assets/ static/assets/ cp static/_build/sw.js static/sw.js 2>/dev/null || true rm -rf static/_build/ echo "Done! $(ls static/assets/ | wc -l) asset files deployed." echo "Run 'git add static/ && git commit && git push' to deploy to server."