Skip to content

feat(ci): deploy to Cloudflare Pages on release publish - #7

Merged
Bugs5382 merged 2 commits into
mainfrom
feat/deploy-cloudflare-pages-on-release
Oct 16, 2026
Merged

Bugs5382 merged 2 commits into
mainfrom
feat/deploy-cloudflare-pages-on-release

Conversation

@Bugs5382

@Bugs5382 Bugs5382 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Separate from the content PR (#6): this adds the workflow that actually puts a built release on
Cloudflare Pages. Nothing in this PR changes what happens on a push or a merged PR -- the new job
only fires on release: published, so the site stays off the internet until I publish a release
by hand, same as the no-tags-automatically rule everywhere else in this repo.

What it does, in order:

  1. Triggers only on release: published (no push, pull_request, or workflow_dispatch).
  2. Checks out the released tag, runs npm ci then npm run build (the same prerender CI already
    runs on every PR).
  3. Uploads build/client/ to the cryptos-pki-www Cloudflare Pages project with
    cloudflare/wrangler-action, pinned by full commit SHA (v4.1.3), using the org secrets
    CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID.

It does not create the Cloudflare Pages project, attach cryptos-pki.com/www.cryptos-pki.com,
or touch DNS -- that's a one-time manual step in the Cloudflare dashboard, documented in
docs/deploy.md along with what goes live and when, and how to roll back (re-publish an older
release, or roll back from the Cloudflare dashboard's Deployments tab).

Permissions are contents: read only; this job doesn't need deployments: write since Wrangler
talks to Cloudflare's API directly, not the GitHub Deployments API.

Verification

  • Lint clean
  • Tests pass
  • Build succeeds
  • Documentation updated (if behavior or API changed)

How this was verified

  • actionlint -shellcheck= on the new workflow file -- clean, no findings.
  • npm run lint, npm run build still pass (lint shows the same pre-existing warning on
    home.tsx that's unrelated to this change and present on main).
  • Resolved the cloudflare/wrangler-action tag v4.1.3 to its commit SHA via the GitHub API
    (tag object -> commit) rather than trusting a cached value, and double-checked it against
    commits/v4.1.3.
  • I can't run the deploy step itself here -- it needs real Cloudflare secrets and an existing
    Pages project, both outside this PR's scope and this box's permissions. The build half of the
    job is exactly what CI already runs on every PR; the deploy half is wrangler-action's own
    tested code, only given different input values.

Refs #8

Closes #8

Adds a workflow gated on release: published only (no push, PR or
dispatch) that builds the prerendered site and uploads build/client
with a SHA-pinned wrangler-action. Documents the project name,
domains and rollback in docs/deploy.md, linked from the README.

Does not create the Cloudflare project, attach domains or touch DNS;
that stays a manual dashboard step.

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
@Bugs5382
Bugs5382 marked this pull request as ready for review October 16, 2026 01:12
@github-actions github-actions Bot added the enhancement New feature (feat). Minor version bump. label Oct 16, 2026
@Bugs5382 Bugs5382 self-assigned this Oct 16, 2026
@Bugs5382 Bugs5382 added this to the v0.1.0 milestone Oct 16, 2026
@Bugs5382

Copy link
Copy Markdown
Contributor Author

Approved. The site deploys to Cloudflare Pages only when a website release is published.

@Bugs5382
Bugs5382 merged commit e83e350 into main Oct 16, 2026
8 checks passed
@Bugs5382
Bugs5382 deleted the feat/deploy-cloudflare-pages-on-release branch October 16, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature (feat). Minor version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ci): deploy to Cloudflare Pages on release publish

1 participant