Skip to content

feat: configure Cloudflare Pages deployment (FRG-177)#33

Merged
chillkimtest-oss merged 1 commit into
mainfrom
feature/frg-177-cloudflare-deploy
Mar 3, 2026
Merged

feat: configure Cloudflare Pages deployment (FRG-177)#33
chillkimtest-oss merged 1 commit into
mainfrom
feature/frg-177-cloudflare-deploy

Conversation

@chillkimtest-oss
Copy link
Copy Markdown
Collaborator

Summary

  • Add nitro.preset = 'cloudflare-pages' to nuxt.config.ts so Nuxt/Nitro targets the Cloudflare Pages + Workers runtime at build time
  • Add wrangler.toml with Cloudflare Pages configuration: nodejs_compat flag (required for htmlparser2), build output directory, and guidance for setting OPENAI_API_KEY as a secret

Deployment Instructions (Cloudflare)

Build:

npx nuxt build

Deploy via Wrangler CLI:

npx wrangler pages deploy dist

Set the API key secret (one-time):

npx wrangler secret put OPENAI_API_KEY

Or via Cloudflare Pages Git Integration:

  • Connect GitHub repo in the Cloudflare Pages dashboard
  • Build command: npx nuxt build
  • Output directory: dist
  • Add OPENAI_API_KEY under Settings → Environment variables (use "Secret" type)

Keeping Vercel Working

Vercel's Git integration automatically sets NITRO_PRESET=vercel during its build, which overrides the cloudflare-pages preset in nuxt.config.ts. Existing Vercel deployments are unaffected.

Test plan

  • nuxt build succeeds and emits dist/_worker.js (Cloudflare Workers entrypoint)
  • dist/_routes.json, dist/_headers, dist/_redirects generated (Cloudflare Pages artifacts)
  • /api/format server route compiled into dist/_worker.js/chunks/routes/api/format.post.mjs
  • No linting errors in changed files
  • Verify end-to-end on deployed Cloudflare Pages URL (requires secrets to be set)

Closes FRG-177

🤖 Generated with Claude Code

- Add nitro.preset = 'cloudflare-pages' to nuxt.config.ts so Nitro
  targets the Cloudflare Pages + Workers runtime on build.
- Add wrangler.toml with name, compatibility_date, nodejs_compat flag,
  and pages_build_output_dir pointing to the Nitro output (dist/).
- Vercel Git integration auto-overrides the preset via NITRO_PRESET=vercel
  so existing Vercel deploys are unaffected.
- OPENAI_API_KEY must be set as a Cloudflare secret (never committed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ohmydoc-using-claude-code-agent Building Building Preview, Comment Mar 3, 2026 10:12am

@chillkimtest-oss chillkimtest-oss merged commit ddc97c9 into main Mar 3, 2026
2 of 4 checks passed
@chillkimtest-oss chillkimtest-oss deleted the feature/frg-177-cloudflare-deploy branch March 3, 2026 10:13
chillkimtest-oss added a commit that referenced this pull request Mar 3, 2026
@chillkimtest-oss
Copy link
Copy Markdown
Collaborator Author

OG Image Fix: PR #44 Open (Spark ⚡ — Mar 20)

The blocker is unblocked! I created PR #44 which:

  • Commits public/og-image.png (was untracked)
  • Adds og:image and twitter:image meta tags to nuxt.config.ts

Once merged, Vercel auto-deploys and social sharing previews will work for the Show HN launch.

Kim/Chill: please review and merge PR #44 before Tue Mar 24.

@chillkimtest-oss
Copy link
Copy Markdown
Collaborator Author

Show HN Pre-Launch Status (T-4 days, Mar 24 target)

✅ Ready

  • Title & body draft finalized (Option A — lead with utility)
  • Lead comment drafted with AI-built angle as secondary
  • 4 prepared responses for common HN reactions (Google Docs, AI slop, LaTeX, no AI)
  • Vercel Analytics live
  • SEO meta tags merged (PR feat(FRG-271): add SEO meta tags (title, OG, Twitter card) #43)
  • OG image created and tested

⬜ Blocker: PR #44 (OG image meta tags)

⬜ Nice-to-have before launch

Post-day plan

  • Kim posts between 9-11 AM ET Tuesday
  • Monitor and respond to comments for first 2-4 hours
  • Track: HN score, comments, GitHub stars, Vercel Analytics clicks

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.

1 participant