Skip to content

Deploy: fast mode, publish first and test after (FAST_DEPLOY) - #169

Merged
david-firia merged 1 commit into
mainfrom
fast-deploy
Dec 3, 2026
Merged

david-firia merged 1 commit into
mainfrom
fast-deploy

Conversation

@david-firia

Copy link
Copy Markdown
Contributor

Launch day: a fix on main took 22 to 24 minutes to go live, nearly all of it the test suite in the deploy job, and longer when main had moved on. This adds a fast mode, switched by the repository variable FAST_DEPLOY.

FAST_DEPLOY=true

  • publish job: build, a seconds-long check that the bundle is whole (tests/built-site.mjs: index and boards pages and every script and stylesheet they load are built, the main bundle is the real app; plus tests/hosting.mjs, the Cache-Control rules), publish, then check the live site serves the new bundle.
  • published-build job: the whole suite (same retry-once rule as today) on the commit just published. It gates nothing and has its own concurrency group with cancel-in-progress, so a newer publish supersedes it. On failure the run is red, an error annotation names the commit, and the run summary says the live site failed its tests.

Unset or anything else: the deploy job, unchanged except that its concurrency moved from the workflow to the job (same group, same no-cancel), so the tests job of a fast run never holds up the next publish.

Newest commit wins: both publishing jobs share the group deploy without cancelling a running publish, build main's tip when the job starts, and publish only if it is still the tip.

PR checks (ci.yml) are untouched.

Estimated fast deploy, merge to live: about a minute (from today's step timings: checkout and setup-node about 10s, npm ci 4s, build 11s, checks a few seconds, Firebase publish 7s, plus runner start).

To turn it on after merging: gh variable set FAST_DEPLOY --body true -R BitsWorkbench/bitsworkbench; off: gh variable delete FAST_DEPLOY -R BitsWorkbench/bitsworkbench.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SS5gJ22trZ3MLrbMSMRuB4

With the repository variable FAST_DEPLOY set to true, the deploy workflow
builds, checks the bundle in seconds (tests/built-site.mjs, tests/hosting.mjs),
publishes, checks the live site serves the new bundle, and only then runs the
whole suite on the published commit in its own job. That job gates nothing;
when it fails the run is red and its summary says the live site failed.

Unset, the deploy job runs as before. Both modes share the job-level
concurrency group deploy without cancelling a running publish, and both
publish only main's tip, so a newer commit always wins a race.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SS5gJ22trZ3MLrbMSMRuB4
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 7add284):

https://firialabs-open-editor--pr169-fast-deploy-wqfjpnch.web.app

(expires Thu, 10 Dec 2026 13:53:56 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 81259a1fec315ca1af3747d225d9c7424890be3e

@david-firia
david-firia merged commit bfd7e1e into main Dec 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant