ci(web): build wasm in the deploy pipeline instead of committing it (#156)
Test / test (pull_request) Successful in 36m3s
Test / test (pull_request) Successful in 36m3s
The wasm bundles in solitaire_server/web/pkg/ are no longer tracked. The web-wasm-rebuild workflow (which rebuilt them in CI and committed them back to master) is gone; instead: - solitaire_server/Dockerfile gains a wasm-builder stage that runs build_wasm.sh with the same pinned toolchain (wasm-bindgen 0.2.120, wasm-pack 0.14.0, binaryen 130) and the runtime image copies pkg/ from it — the image build is now the artifacts' single source of truth. - web-e2e builds the wasm before Playwright runs, and its trigger paths now include the wasm-feeding crates it actually tests. - docker-build triggers on solitaire_data/** and build_wasm.sh too, so every wasm-affecting change redeploys. - Self-hosters serving /web or /play from a source checkout run ./build_wasm.sh once (script header and ARCHITECTURE.md updated). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
# Live-watch the Gitea Actions deploy pipeline for Ferrous Solitaire.
|
||||
#
|
||||
# Polls recent workflow runs and prints a compact status block each cycle.
|
||||
# Stops when the newest docker-build (the deploy) has completed and no
|
||||
# web-wasm-rebuild is still pending — i.e. the full fix is live.
|
||||
# Stops when the newest docker-build (the deploy) has completed — the wasm
|
||||
# is built inside that image build, so no other workflow gates the deploy.
|
||||
#
|
||||
# Usage: ./scripts/watch_deploy.sh [interval_seconds]
|
||||
# token is read from ~/.config/tea/config.yml (never printed).
|
||||
@@ -49,16 +49,15 @@ for r in runs:
|
||||
r.get("id"), str(r.get("head_sha"))[:7], wf[:18],
|
||||
r.get("status"), r.get("conclusion")))
|
||||
db = [r for r in runs if "docker-build" in str(r.get("path"))]
|
||||
wr_pending = any(r.get("status") != "completed" for r in runs if "web-wasm-rebuild" in str(r.get("path")))
|
||||
top = db[0] if db else None
|
||||
live = bool(top and top.get("status")=="completed" and top.get("conclusion")=="success" and not wr_pending)
|
||||
print("STATE=%s" % ("LIVE" if live else ("WAIT_WASM" if wr_pending else "DEPLOYING")))
|
||||
live = bool(top and top.get("status")=="completed" and top.get("conclusion")=="success")
|
||||
print("STATE=%s" % ("LIVE" if live else "DEPLOYING"))
|
||||
PY
|
||||
)"
|
||||
echo "$out" | grep -v '^STATE='
|
||||
if echo "$out" | grep -q '^STATE=LIVE'; then
|
||||
echo ""
|
||||
echo "DEPLOY LIVE — newest docker-build succeeded, no wasm rebuild pending."
|
||||
echo "DEPLOY LIVE — newest docker-build succeeded."
|
||||
echo " Test: https://klondike.aleshym.co/play?v=${RANDOM}"
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user