Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/preview-delete-force.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nostream-website": patch
---

Preview cleanup no longer trips the deploy token's missing KV scope: wrangler delete runs with --force, skipping the dependents probe that errored after a successful delete. Preview workers are assets-only, so nothing else changes.
9 changes: 7 additions & 2 deletions .github/workflows/deploy-website-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,13 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
run: |
# A missing worker exits non-zero; treat already-gone as success.
npx wrangler delete --config wrangler.preview.jsonc \
# --force skips the "would this break dependents" probe, which calls
# KV namespaces listing the deploy token's scope (Workers Scripts
# only) cannot read — the probe errors with auth 10000 AFTER the
# delete has already succeeded. Preview workers are assets-only
# (no bindings), so the check is pure overhead. A missing worker
# still errors and is caught below.
npx wrangler delete --config wrangler.preview.jsonc --force \
--name nostream-web-pr-${{ github.event.pull_request.number }} \
|| echo "preview worker already absent"

Expand Down
Loading