Skip to content

ci: preview each pull request on Cloudflare Workers - #21

Merged
simonvanlierde merged 1 commit into
mainfrom
ci/pr-previews
Oct 28, 2026
Merged

simonvanlierde merged 1 commit into
mainfrom
ci/pr-previews

Conversation

@simonvanlierde

Copy link
Copy Markdown
Owner

Each PR now gets a live preview of the notebook, so I can try a change in the browser before it lands on simonvanlierde.com/io-notebook.

  • A new preview job uploads the WASM export as a version of an io-notebook-preview Cloudflare Worker, at a stable pr-<number> address that the PR links as its preview deployment. The live page stays on GitHub Pages.
  • On the first upload the job creates the Worker with a placeholder page, since wrangler won't upload a version to a Worker that doesn't exist.
  • Previews send X-Robots-Tag: noindex.
  • The job skips with a notice on fork PRs and while the preview environment has no Cloudflare secrets.

Tests: the same job runs on simonvanlierde.github.io#91, where it created its Worker and served the PR at its pr-91 address. Here it skips until the secrets are set.

- Upload the PR's export as a version of a preview Worker, at a stable
  pr-<number> alias that the PR links as its preview deployment
- Create the Worker with a placeholder page on the first upload
- Send X-Robots-Tag noindex from previews
- Skip with a notice on fork PRs or when the preview secrets are missing
@simonvanlierde
simonvanlierde merged commit 1b9ae57 into main Oct 28, 2026
7 checks passed
@simonvanlierde
simonvanlierde deleted the ci/pr-previews branch October 28, 2026 22:53

This branch was successfully deployed

1 active deployment
preview — fa89bfc2 Deployed Oct 28, 2026 by simonvanlierde via preview #46
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