Fix the Pages deploy step, and trim Google OAuth credentials - #3
Merged
Merged
Conversation
The first real deploy got the Worker out and failed on Pages: wrangler-action installs its own default wrangler (3.90.0) unless told otherwise, and that rejected --functions-directory. No version of wrangler has that flag — `pages deploy` compiles ./functions from the working directory, which is already the repo root. Drop the flag and pin the action to the backend's wrangler (4.134.0). `wrangler pages functions build functions` compiles the proxy cleanly with it. Also trim GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET before use. They are pasted into `wrangler secret put` by hand, and a trailing newline or carriage return makes Google answer "The provided client secret is invalid" with nothing visibly wrong. Neither can contain whitespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TivKBtoj8GvfK4yeS44Vnr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The first real deploy after #2 shipped the Worker, but the Pages step failed. So
bottlecount-epj.pages.devis still serving an older manual deploy that doesn't have the funnel fixes. This PR fixes the workflow so the frontend deploys.Pages deploy
cloudflare/wrangler-action@v3installs its own default wrangler (3.90.0) unless you setwranglerVersion. That version rejected--functions-directory(failed run).--functions-directory.pages deploycompiles./functionsfrom the working directory, which is already the repo root.wranglerVersion: '4.134.0', the same version the backend uses.Google OAuth credentials
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETare now trimmed before use.wrangler secret putby hand. A trailing newline or carriage return, easy to pick up when Windows Node runs from WSL, makes Google reject the secret with "The provided client secret is invalid", and nothing looks wrong.Testing
npx wrangler pages functions build functionswith wrangler 4.134.0: thefunctions/proxy compiles.npm run typecheckpasses, and all 113 tests pass.main. Merging this is the test: the Deploy Pages step should succeed, and the site should then serve the new frontend.🤖 Generated with Claude Code
https://claude.ai/code/session_01TivKBtoj8GvfK4yeS44Vnr
Generated by Claude Code