Skip to content

Deploy to production on merge to main - #16

Open
blindtechmage wants to merge 1 commit into
mainfrom
ci/deploy-on-merge
Open

Deploy to production on merge to main#16
blindtechmage wants to merge 1 commit into
mainfrom
ci/deploy-on-merge

Conversation

@blindtechmage

Copy link
Copy Markdown
Owner

Summary

  • Extends the existing ci.yml to also trigger on push to main (previously pull_request only).
  • Adds a deploy job that runs a real wrangler deploy (promotes the new version to the Active Deployment, unlike the PR preview workflow's versions upload), gated behind lint, unit-tests, build-and-html-lint, and accessibility-e2e all passing against main itself — not just trusting that the PR's own checks were green before merge.
  • Reuses the same CLOUDFLARE_API_KEY secret, CLOUDFLARE_ACCOUNT_ID variable, and PUBLIC_RECAPTCHA_SITE_KEY variable already wired up for PR previews.

Closes the "no deploy-on-merge workflow" gap — until now, main and the live production Worker could drift apart with no automated way to reconcile them (confirmed firsthand after the last PR: the contact form's RATE_LIMIT binding and current pages were merged to main but not live in production).

Notes

  • This PR's own merge to main is the first real test of the deploy job — it can't be exercised any other way (no push event fires until it's actually on main).

Test plan

  • npm run typecheck
  • npm run lint (js + markdown)
  • Workflow YAML validated with js-yaml
  • Live deploy-on-merge (self-verifying — will only run after this PR merges to main)

Extends the existing CI workflow to also trigger on push to main, and
adds a deploy job that runs a real wrangler deploy (promoting the new
version to the Active Deployment, unlike the PR preview workflow's
versions upload) once lint, unit tests, build/HTML-lint, and the
accessibility/E2E suite all pass against main itself.

Closes the "no deploy-on-merge workflow" gap flagged after the
contact-form provisioning work — main and production had been able to
drift apart with no automated way to reconcile them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

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.

2 participants