Skip to content

ci: gate deploy on checks + caching, timeouts, shared setup-vp action#12

Merged
wormeyman merged 1 commit into
wormeyman-space-age-supportfrom
ci/gate-deploy-and-speedups
Jun 29, 2026
Merged

ci: gate deploy on checks + caching, timeouts, shared setup-vp action#12
wormeyman merged 1 commit into
wormeyman-space-age-supportfrom
ci/gate-deploy-and-speedups

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

Automation hardening follow-up to the Vite+ migration (#11). No app code changes - workflows only.

Why

After #11, ci.yml and deploy.yml both triggered on push to wormeyman-space-age-support and ran in parallel. Deploy only ran its own lint + build (not tests or the type-gate) and didn't wait for CI - so a merge that broke tests could still ship to Cloudflare.

What changed

  • Deploy is now gated on green checks. Merged deploy.yml into ci.yml as a deploy job with needs: checks. It runs only on push to the deploy branch, or a manual workflow_dispatch with the new deploy input set - never on pull requests. Removed the now-redundant lint step from deploy (checks gates it).
  • npm download cache (~/.npm, keyed on the root + worker lockfiles). The old setup-node cache: npm was lost in the migration, so every run was re-fetching all deps.
  • Worker deps via npm ci. packages/worker has its own lockfile; installing it means the deploy uses the project's locked wrangler instead of the action installing a floating wrangler@4 each run. package.json keeps ^4.75.0.
  • Job timeouts (10m checks / 15m deploy) and workflow-level concurrency with cancel-in-progress so superseded PR/branch pushes don't pile up (ci had none before; preserves deploy.yml's cancel-on-newer-push intent).
  • Shared setup-vp composite action (.github/actions/setup-vp) - one source of truth for the pinned vp version + installer checksum, used by both jobs, instead of duplicating the install block.

Verification

YAML validates and the worker npm ci is lockfile-clean locally. The gating logic, the deploy input, and the composite action can only be fully exercised on this PR's CI run + the next merge deploy. The checks job behavior is unchanged from #11 (already proven green).

Note

The deploy is now the CI / Deploy to Cloudflare job rather than a standalone Deploy to Cloudflare workflow. If any branch-protection required-status-check referenced the old workflow name, it'd need updating (didn't appear to block #11's merge).

🤖 Generated with Claude Code

https://claude.ai/code/session_01K7yKKMZne7uzgxPw2RUkUG

…ction

Automation hardening after the Vite+ migration:

- Gate deploys on green checks. deploy.yml previously ran in parallel with CI
  on the same push, so a merge that broke tests or the type-gate could still
  ship. Merge both into ci.yml: a `deploy` job with `needs: checks` that runs
  only on push to the deploy branch (or a manual dispatch with the deploy
  input), never on pull requests. The deploy job no longer re-lints - checks
  already gates lint/test/gate.
- Add an npm download cache (~/.npm, keyed on the lockfiles) so CI and deploy
  stop re-fetching every dependency each run; the old setup-node cache: npm was
  lost in the migration.
- Install worker deps with `npm ci` (packages/worker has its own lockfile) so
  the Cloudflare deploy uses the project's locked wrangler instead of letting
  the action install a floating wrangler@4 each run.
- Add job timeouts (10m checks, 15m deploy) and workflow-level concurrency with
  cancel-in-progress so superseded PR pushes and branch pushes don't pile up.
- Factor the pinned, checksum-verified vp install into a shared composite
  action (.github/actions/setup-vp) - one source of truth for the vp version
  and installer checksum instead of duplicating across two workflows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7yKKMZne7uzgxPw2RUkUG
@wormeyman
wormeyman merged commit f7fd40d into wormeyman-space-age-support Jun 29, 2026
6 checks passed
@wormeyman
wormeyman deleted the ci/gate-deploy-and-speedups branch June 29, 2026 23:19
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