Skip to content

Add production deployment workflow - #39

Closed
konojunya wants to merge 1 commit into
mainfrom
jj/production-deploy
Closed

Add production deployment workflow#39
konojunya wants to merge 1 commit into
mainfrom
jj/production-deploy

Conversation

@konojunya

Copy link
Copy Markdown
Member

Background

Production rebuilds need a GitHub Actions entry point for manual runs and external content events such as a microCMS webhook. GitHub requires repository_dispatch workflows to exist on the default branch.

Implementation Approach

  • Add .github/workflows/production-deploy.yaml.
  • Trigger it from workflow_dispatch, pushes to main, and repository_dispatch with event type microcms_update.
  • Restrict production execution to the main ref and serialize deployments.
  • Repeat format, lint, test, build, and Cloudflare dry-run gates before wrangler deploy.
  • Read Cloudflare credentials only from CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN Actions secrets.
  • Document the triggers and required secret names in CONTRIBUTING.md.

Testing Approach

  • actionlint .github/workflows/production-deploy.yaml
  • npm run format:check
  • npm run lint
  • npm test
  • npm run build
  • npm run cloudflare:check

All checks pass locally.

Review Perspectives / Points of Concern

  • Configure both Cloudflare Actions secrets before merging; the repository currently exposes no repository-level Actions secrets.
  • Cloudflare already appears to deploy pushes from the connected Git repository. If that trigger remains enabled, a main push may deploy once through Workers Builds and once through this workflow. Confirm whether to keep both paths or make GitHub Actions the only production deploy path.
  • Configure the microCMS GitHub Actions webhook trigger event name exactly as microcms_update after this workflow reaches main.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
stack-web 04dc1e5 Commit Preview URL

Branch Preview URL
Sep 06 2026, 11:14 AM

@konojunya konojunya closed this Sep 6, 2026
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