fix(ci): migrate from pages-action to wrangler-action - #1032
Conversation
…action The deprecated pages-action@v1.5.0 (using wrangler v2) rejects commit messages containing multi-byte UTF-8 characters such as "→". Migrating to wrangler-action@v3 resolves this and uses the supported wrangler v4. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Chris Lalancette <chris.lalancette@foxglove.dev>
wrangler-action@v3 doesn't support custom deployment names — it hardcodes the environment to just "preview" or "production". Replace its built-in deployment creation with explicit github-script steps that restore the old "project-name (Preview/Production)" format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace actions/github-script with gh CLI and JSON heredocs to create GitHub Deployments. The previous github-script approach likely failed silently because wrangler-action does not set deployment-url output when gitHubToken is omitted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of migrating to wrangler-action (which lacks GitHub Deployment naming support), stay on pages-action@v1.5.0 and set wranglerVersion to "3" to fix the UTF-8 commit message rejection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
The net change here is just adding wranglerVersion: "3" to both pages-action steps — the earlier attempt to migrate to wrangler-action was reverted. The fix itself is small and targeted, but the PR title/description still describe the migration that was abandoned. Should be updated before merge so the squash commit message is accurate.
(Previous review from me was on the pre-revert state and is no longer relevant.)
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
| wranglerVersion: "3" |
There was a problem hiding this comment.
suggestion: The PR title says "migrate from pages-action to wrangler-action" but the final change stays on cloudflare/pages-action@v1.5.0 and just pins wranglerVersion: "3". The title and description should be updated to match what this PR actually does — otherwise the squash commit message will be misleading.
Also: pages-action is deprecated. Pinning wrangler v3 is a reasonable short-term fix to unblock CI, but is there a follow-up planned to actually migrate to wrangler-action? Worth tracking if so.
Whew. Well, it looks like there is no way that either I or Claude could find to make that nicer; it seems to be hardcoded within wrangler-action. Thus we have two options:
@gasmith What do you think? |
|
I was going to suggest filing an issue, but check out that familiar avatar: cloudflare/wrangler-action#333 (comment) |
gasmith
left a comment
There was a problem hiding this comment.
LG, I think this is the best we can do for now.
gasmith
left a comment
There was a problem hiding this comment.
Derp, where's that approve button...
Oh, haha. Even better, there is a PR to fix it that has not been merged: cloudflare/wrangler-action#355 . Well, I'm going to go ahead and merge this one in, and we can update later on if the maintainers ever fix that bug. |


The deprecated pages-action@v1.5.0 (using wrangler v2) rejects commit messages containing multi-byte UTF-8 characters such as "→". Migrating to wrangler-action@v3 resolves this and uses the supported wrangler v4.
Changelog
None.
Docs
None.
Description
After merging in #949, which had UTF-8 arrows in the commit message, we were failing to upload to cloudflare in the "playground" action: https://github.com/foxglove/foxglove-sdk/actions/runs/23294567795/job/67752339585 . Besides that, there is warning that pages-action is deprecated, and indeed it is: https://github.com/cloudflare/pages-action . This PR should solve both of the issues by upgrading us to wrangler-action . I won't know for sure if this fixes the issue until CI runs.