Skip to content

fix(ci): deploy Workers before uploading branch previews - #18

Closed
imconnorngl wants to merge 1 commit into
LunarClient:devfrom
imconnorngl:fix/wrangler-preview-action
Closed

imconnorngl wants to merge 1 commit into
LunarClient:devfrom
imconnorngl:fix/wrangler-preview-action

Conversation

@imconnorngl

Copy link
Copy Markdown
Member

Description

Run a full Worker deployment before uploading branch previews so the Worker exists and its observability settings are applied. Branches other than dev then upload an aliased, tagged preview version using cloudflare/wrangler-action@v3.

Type of Change

  • Bug fix
  • Build/CI changes

Changes Made

  • Run deploy --no-x-provision for both production and development.
  • Upload previews through the Wrangler action using the existing account secrets, environment, branch alias, and run-specific tag.
  • Remove the separate Worker initialization and preview-version activation steps.
  • Remove the explicit CLOUDFLARE_ENV preflight check; the selected GitHub environment must still configure this variable.

Testing

  • Passed: pnpm exec oxfmt --check .github/workflows/deploy-workers.yml.
  • Passed: git diff --check.
  • Verified the preview command's flags against installed Wrangler 4.127.1 and removed the unsupported --yes flag.
  • pnpm lint stops on an existing formatting issue in unchanged CLAUDE.md.
  • The corrected upload command passed argument parsing, but bundle dry-run validation was blocked by local Windows filesystem permissions. No live deployment was performed.

Deployment Notes

dev uses cloudflare-production; other branches use cloudflare-development. Each GitHub environment must supply CLOUDFLARE_ENV, CLOUDFLARE_API_TOKEN, and CLOUDFLARE_ACCOUNT_ID.

@imconnorngl imconnorngl closed this by deleting the head repository Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant