Skip to content

Add Cloudflare Worker deploy workflow#2

Merged
avikalpg merged 2 commits into
masterfrom
nia/add-cloudflare-deploy-workflow
May 31, 2026
Merged

Add Cloudflare Worker deploy workflow#2
avikalpg merged 2 commits into
masterfrom
nia/add-cloudflare-deploy-workflow

Conversation

@avikalpg

Copy link
Copy Markdown
Owner

Summary

  • add a GitHub Actions deploy workflow for pushes to master/main and manual dispatch
  • run the test suite before deploying
  • inject Cloudflare account, API token, SEED_TOKEN, and KV namespace id from GitHub Secrets at runtime

Verification

  • npm test
  • parsed deploy.yml as YAML
  • added repo secrets: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, SEED_TOKEN, COUNTERS_KV_NAMESPACE_ID

Notes

The Worker was also deployed manually from the merged master code before this PR, because the deploy workflow is not live until this PR is merged.

Deploy should follow merges to the default branch instead of requiring a manual wrangler run after code review.

The workflow runs tests, injects deployment-only Cloudflare secrets at runtime, and publishes the Worker on pushes to master or main.
Comment thread .github/workflows/deploy.yml Outdated

- uses: actions/setup-node@v4
with:
node-version: '20'

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use such an old node version instead of the latest LTS version?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Node 20 is stale here; Node 24 is the current LTS line. Updated both the new deploy workflow and the existing test workflow to use Node 24 so CI and deploy run on the same runtime.

@avikalpg avikalpg merged commit be557be into master May 31, 2026
1 check passed
@avikalpg avikalpg deleted the nia/add-cloudflare-deploy-workflow branch May 31, 2026 07:26
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