Skip to content

Cloudflare-based PR Preview - #873

Closed
jasongrout wants to merge 6 commits into
jupyter:mainfrom
jasongrout:cloudflare
Closed

Cloudflare-based PR Preview#873
jasongrout wants to merge 6 commits into
jupyter:mainfrom
jasongrout:cloudflare

Conversation

@jasongrout

@jasongrout jasongrout commented Jul 31, 2026

Copy link
Copy Markdown
Member

This experiments with a cloudflare-based PR preview mechanism as an attempt to resolve #768

Findings:

  1. The cloudflare github integration only generates PR previews for branches on the main repo. In order to have pr previews from forks, we need to do something like the workflows in this PR.
  2. Building pr previews from forks requires a two-step process that is a bit awkward in order to avoid leaking secrets.
    1. Build the site without any secrets. Upload the built site as an artifact
    2. Upload the artifact to cloudflare in a workflow that is triggered by successful completion of the workflow 1. This upload uses secret cloudflare tokens and is not directly tied to the PR. This means the preview is not just an action on the PR, and it is a bit awkward to update the PR (we have to find the PR number and edit a comment).
  3. I experimented with generating a deploy to make the preview easier to find, but I think that pollutes the repo-wide deployments, which I don't think is worth it.
  4. Cloudflare deployments apparently stick around forever (as opposed to Netlify previews that have I think a 90-day retention). I think that is a liability, so this workflow also includes a cron job to delete cloudflare deployments.

Overall, I think cloudflare previews are too complicated to pursue at this time. If their GitHub app supported generating pr previews from forks, and they introduced an automatic retention limit, I think it would be worth reconsidering.

Claude Fable 5 helped with this PR.

@choldgraf

Copy link
Copy Markdown
Collaborator

My suggestion would be to use either netlify or read the docs over cloudflare, just to avoid having yet another way of hosting PR previews within the jupyter ecosystem, but if you want to go with this approach it seems fine to me as well

This would clutter up the main repo's deployment listing with pr previews. We can just rely on the comment in PRs.
@jasongrout

Copy link
Copy Markdown
Member Author

I think it's not worth pursuing this. I've updated the top-level comment with my thoughts.

@jasongrout jasongrout closed this Jul 31, 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.

Move netlify to a ssc owned account ?

3 participants