Skip to content

ci: add Cloudflare Pages deploy step#4

Merged
TeoSlayer merged 1 commit into
mainfrom
add-cloudflare-deploy
May 29, 2026
Merged

ci: add Cloudflare Pages deploy step#4
TeoSlayer merged 1 commit into
mainfrom
add-cloudflare-deploy

Conversation

@TeoSlayer
Copy link
Copy Markdown
Contributor

Summary

Adds a Cloudflare Pages deploy step to `ci.yml` so push-to-main automatically publishes the built site to pilotprotocol.pages.dev. The deploy was lost when deploy-website.yml was removed (PILOT-169) and never re-wired after the web4 → website split — today's merged docs PRs (#1, #2, #3) are sitting in main but not live.

Wiring

  • Uses `cloudflare/wrangler-action@v3` with `pages deploy dist --project-name=pilotprotocol`
  • Reads `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` from repo secrets (just set up via the org-secrets migration)
  • Only runs on push-to-main; PRs (including forks) skip deploy so production isn't published from untrusted branches

Token scope verified

  • API token has Account → Cloudflare Pages → Edit on account ef9da13d (verified via /tokens/verify and a list-projects call returning the pilotprotocol project)

Test plan

  • Build still works (no change to build step)
  • Merge → confirm deploy step succeeds in the CI run
  • Verify pilotprotocol.pages.dev shows the latest docs commits

Restores automated deployment for the production site at
pilotprotocol.pages.dev. The deploy was lost when deploy-website.yml
was removed (PILOT-169) and never re-wired after the web4 → website
split.

The new step runs only on push-to-main (forks/PRs are skipped — they
don't have the secrets and shouldn't publish to production anyway).
Uses cloudflare/wrangler-action@v3 with the new CLOUDFLARE_API_TOKEN
and CLOUDFLARE_ACCOUNT_ID secrets now configured on this repo.
@TeoSlayer TeoSlayer force-pushed the add-cloudflare-deploy branch from d4c85b6 to 8aead29 Compare May 28, 2026 20:35
@TeoSlayer TeoSlayer merged commit 3d1b633 into main May 29, 2026
2 checks passed
TeoSlayer added a commit that referenced this pull request May 29, 2026
PR #4 added the deploy step but the wrangler-action does not auto-post a
PR comment, so reviewers can't see the preview URL without digging into
workflow logs (verified on PRs #12-14: deploy succeeded, comment missing).

This adds a sticky comment step that uses the deployment-url output from
the wrangler-action and posts (or updates) a single comment per PR via
marocchino/sticky-pull-request-comment@v2.

Also bumps the workflow's permissions to include pull-requests: write,
which is required for the comment step.

Co-authored-by: Teodor Calin <teodor@vulturelabs.io>
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