Skip to content

fix cloudflare pages(?)#40

Open
magicmark wants to merge 5 commits into
mainfrom
magicmark-patch-6
Open

fix cloudflare pages(?)#40
magicmark wants to merge 5 commits into
mainfrom
magicmark-patch-6

Conversation

@magicmark
Copy link
Copy Markdown
Contributor

No description provided.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 21, 2026

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
gaps 59c2191 Commit Preview URL

Branch Preview URL
May 26 2026, 04:25 AM

@magicmark
Copy link
Copy Markdown
Contributor Author

This seems like the correct way to do it.

When I tried enabling cloudflare with a personal account on a copy of this repo, it actually robogenerated this PR magicmark/gaps-website-test-1#1

with this message:

Screenshot 2026-05-22 at 7 52 46 PM

by the by, I was surprised/concerned that this PR would be able to affect what cloudflare does (since it's not on main) but I guess that's intentional. The security model is that it only runs on non-fork PRs....which means deploy previews don't work like they do with vercel. didn't realize this, hrmph.

i guess we could build something custom but was hoping not to have to maintain infra, hoping it would work out the box.

magicmark and others added 3 commits May 25, 2026 01:27
First half of a secure fork-safe deploy preview setup. This workflow
runs on all PRs (including forks), builds the site with no access to
secrets, and uploads the artifact. A separate workflow_run-triggered
workflow will handle the privileged Cloudflare deploy.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Second half of the secure fork-safe deploy preview setup. Downloads the
build artifact from the unprivileged build workflow and deploys to
Cloudflare Pages. Has access to secrets but never executes fork code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ssions

- Fix critical bug: pull_requests[] is empty for fork PRs in workflow_run
  events. Save PR number as artifact metadata instead.
- Add actions: read permission so download-artifact can fetch cross-workflow
- Update action versions to latest: checkout@v6, upload-artifact@v7,
  download-artifact@v8, wrangler-action@v4

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
magicmark added a commit to magicmark/gaps that referenced this pull request May 26, 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