Skip to content

Deploy the API to Cloudflare from the update workflow - #7

Draft
TimMonko wants to merge 1 commit into
cf/05-parity-checkfrom
cf/06-deploy-cloudflare
Draft

TimMonko wants to merge 1 commit into
cf/05-parity-checkfrom
cf/06-deploy-cloudflare

Conversation

@TimMonko

Copy link
Copy Markdown
Member

After each update, the workflow builds site/ and deploys it to
Cloudflare with wrangler deploy on scheduled and manual runs, and as a
preview version (pr-) on pull requests from this repository;
PRs from forks get no secrets and skip it. Pull requests also keep the
built site as an artifact for review.

GitHub Pages is no longer deployed: Cloudflare serves the same files.
(npe2api's GitHub Pages mirror, https://napari.org/npe2api/, has no
known users and stays with npe2api.)

A deploy uploads only the files whose content changed, so a run that
updates a few plugins uploads a few files.

worker/README.md covers local work, the one-time setup (an API token and
two repository secrets) and the hostname switch-over. wrangler.jsonc
enables the workers.dev URL and preview URLs, which is where the parity
check runs before any DNS change.

Ashley Anderson's cloudflare-poc branch first built this workflow shape:
deploy on schedule, previews for PRs, and the update job feeding
Cloudflare directly.

Co-authored-by: Ashley Anderson aganders3@gmail.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@TimMonko
TimMonko added this pull request to stack #9 November 20, 2026 06:03
@TimMonko
TimMonko force-pushed the cf/06-deploy-cloudflare branch from e50968f to adad667 Compare November 20, 2026 06:25
After each update, the workflow builds site/ and deploys it to
Cloudflare with `wrangler deploy` on scheduled and manual runs, and as a
preview version (pr-<number>) on pull requests from this repository;
PRs from forks get no secrets and skip it. Pull requests also keep the
built site as an artifact for review.

GitHub Pages is no longer deployed: Cloudflare serves the same files.
(npe2api's GitHub Pages mirror, https://napari.org/npe2api/, has no
known users and stays with npe2api.)

With Pages gone, nothing writes to this repository any more, so the job
drops to read-only contents permission. id-token goes too: Google Cloud
authenticates with a key file, not OIDC.

A deploy uploads only the files whose content changed, so a run that
updates a few plugins uploads a few files.

worker/README.md covers local work, the one-time setup (an API token and
two repository secrets) and the hostname switch-over. wrangler.jsonc
enables the workers.dev URL and preview URLs, which is where the parity
check runs before any DNS change.

Ashley Anderson's cloudflare-poc branch first built this workflow shape:
deploy on schedule, previews for PRs, and the update job feeding
Cloudflare directly.

Co-authored-by: Ashley Anderson <aganders3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant