Skip to content

Fix the Pages deploy step, and trim Google OAuth credentials - #3

Merged
Fre0Grella merged 1 commit into
mainfrom
claude/festive-babbage-7mm4d3
Sep 28, 2026
Merged

Fre0Grella merged 1 commit into
mainfrom
claude/festive-babbage-7mm4d3

Conversation

@Fre0Grella

Copy link
Copy Markdown
Owner

Summary

The first real deploy after #2 shipped the Worker, but the Pages step failed. So bottlecount-epj.pages.dev is still serving an older manual deploy that doesn't have the funnel fixes. This PR fixes the workflow so the frontend deploys.

Pages deploy

  • Cause: cloudflare/wrangler-action@v3 installs its own default wrangler (3.90.0) unless you set wranglerVersion. That version rejected --functions-directory (failed run).
  • The flag isn't needed: no version of wrangler has --functions-directory. pages deploy compiles ./functions from the working directory, which is already the repo root.
  • Fix: drop the flag and pin the action to wranglerVersion: '4.134.0', the same version the backend uses.

Google OAuth credentials

  • GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are now trimmed before use.
  • They're pasted into wrangler secret put by 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.
  • Neither value can legitimately contain whitespace.

Testing

  • npx wrangler pages functions build functions with wrangler 4.134.0: the functions/ proxy compiles.
  • Backend: npm run typecheck passes, and all 113 tests pass.
  • Prettier is clean on both changed files.
  • Not yet run end to end in CI, because the deploy workflow only runs on 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

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
@Fre0Grella
Fre0Grella merged commit 7ce8d72 into main Sep 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants