Skip to content

chore: migrate preview deployments from Vercel to Cloudflare Pages via GitHub Actions#395

Merged
mattaereal merged 2 commits intodevelopfrom
chore/cf-workflows
Feb 28, 2026
Merged

chore: migrate preview deployments from Vercel to Cloudflare Pages via GitHub Actions#395
mattaereal merged 2 commits intodevelopfrom
chore/cf-workflows

Conversation

@scode2277
Copy link
Copy Markdown
Collaborator

This PR:
Replaces Vercel preview deployments with Cloudflare Pages Direct Upload using the refined-cf-pages-action. This enables preview deployments for PRs from forks, as well as move all the CF deployment to go through the github workflows and not anymore with the git integration.

The updates of the PR:

  • Add deploy workflow for all branch pushes (main/develop/all other internal branches)
  • Add build + deploy split workflows for fork PR previews. 2 workflows are needed as a safety measure so the build runs in an unprivileged context as a protection against forks content / two workflows are needed as a safety measure: the build runs in an unprivileged context with no access to secrets, protecting against malicious fork content. The deploy step only uploads pre-built static files
  • Remove vercel.json and all Vercel references from all the files
  • Update searchbar-indexing and sitemap-generator to run in CI, as the build now runs on github action runners instead of cf pages

What will change in our usual workflow:

  • The only thing is that, with this approach, we will check the logs directly in the Action run instead of the Cloudflare Pages dashboard. The CF dashboard will still show deployment history and URLs, but won't have build output

Closes #280

Frameworks PR Checklist

Thank you for contributing to the Security Frameworks! Before you open a PR, make sure to read information for contributors and take a look at the following checklist:

  • Describe your changes, substitute this text with the information
  • If you are touching an existing piece of content, tag current contributors from the attribution list
  • If there is a steward for that framework, ask the steward to review it
  • If you're modifying the general outline, make sure to update it in the vocs.config.tsx adding the dev: true parameter
  • If you need feedback for your content from the wider community, share the PR in our Discord
  • Review changes to ensure there are no typos, see instructions below

@scode2277 scode2277 requested a review from mattaereal February 25, 2026 17:16
@scode2277 scode2277 added the local setup Improvements or additions to the local setup label Feb 25, 2026
@scode2277 scode2277 changed the title chore: migrate deployments from Vercel to Cloudflare Pages via GitHub Actions chore: migrate preview deployments from Vercel to Cloudflare Pages via GitHub Actions Feb 25, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Feb 28, 2026

Deploying frameworks with  Cloudflare Pages  Cloudflare Pages

Latest commit: a28e08e
Status: ✅  Deploy successful!
Preview URL: https://5306471d.frameworks-573.pages.dev
Branch Preview URL: https://chore-cf-workflows.frameworks-573.pages.dev

View logs

@mattaereal
Copy link
Copy Markdown
Collaborator

It should be already working by now, let's test it out

@mattaereal mattaereal merged commit dca6aee into develop Feb 28, 2026
4 of 5 checks passed
@scode2277 scode2277 deleted the chore/cf-workflows branch March 2, 2026 18:02
frameworks-volunteer pushed a commit to frameworks-volunteer/frameworks that referenced this pull request Mar 9, 2026
…a GitHub Actions (security-alliance#395)

* chore: migrate deployments from Vercel to Cloudflare Pages via GitHub Actions

* A bit of hardening to preview workflows

---------

Co-authored-by: matta <matt@theredguild.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

local setup Improvements or additions to the local setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CF PRs from forks preview deployments

2 participants