Skip to content

Support Cloudflare deployment - #175

Merged
amrabed merged 5 commits into
mainfrom
feat/cloudflare-deployment
Nov 9, 2026
Merged

amrabed merged 5 commits into
mainfrom
feat/cloudflare-deployment

Conversation

@amrabed

@amrabed amrabed commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR adds support for deploying cur8d to Cloudflare Workers via OpenNext and Wrangler, providing full Next.js App Router (SSR, Server Components, Streaming, and Route Handlers) parity along with edge static asset hosting.

Summary of Changes

  • Cloudflare Workers Architecture:
    • Added open-next.config.ts defining OpenNext Cloudflare adapter configuration.
    • Added wrangler.json configuring the application Worker (.open-next/worker.js), nodejs_compat runtime compatibility flags, and static assets directory (.open-next/assets).
    • Added docs/wrangler.json configuring documentation hosting using native Workers Static Assets (docs/out).
  • Dependencies & Tools:
    • Added @opennextjs/cloudflare and wrangler to devDependencies in package.json.
    • Added workerd to allowBuilds in pnpm-workspace.yaml.
    • Added .open-next/ and .wrangler/ to .gitignore and eslint.config.mjs ignores.
  • Mise & Scripts:
    • Added deploy:cloudflare task in .mise.toml running opennextjs-cloudflare build and deploying via wrangler deploy.
    • Added "build:worker", "deploy:cloudflare", and "deploy:cloudflare:docs" scripts in package.json.
    • Updated scripts/init.ts to customize wrangler.json, docs/wrangler.json, and open-next.config.ts.
  • CI/CD Workflow:
    • Updated .github/workflows/deploy.yml with cloudflare provider option and deploy-cloudflare job.
    • Updated jdx/mise-action to v5 across deploy.yml, check.yml, and docs.yml.
  • Documentation:
    • Created docs/content/deployment/cloudflare.mdx detailing Cloudflare Workers architecture, OpenNext adapter, configuration, GitHub secrets, and local deployment with mise.
    • Updated docs/content/deployment/_meta.js and docs/content/deployment/index.mdx.
    • Updated docs/content/adr/adr-008-vercel.mdx, environment-variables.mdx, project-structure.mdx, and workflows.mdx.
    • Cleaned up configuration links across deployment docs to use relative paths (../../../wrangler.json, ../../../.firebaserc, etc.).
    • Updated README.md and AGENTS.md.

Verification

  • mise run verify (ESLint, TypeScript typecheck, Vitest coverage: 17/17 test files passed, 58/58 tests passed, >94% coverage).
  • mise run docs:build (Nextra documentation build passed, 35/35 pages generated).
  • pnpm run build:worker (opennextjs-cloudflare build succeeded, bundle generated).
  • wrangler deploy --dry-run and wrangler deploy --dry-run --env preview succeeded without warnings for both root application and docs.

@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
typescript Ready Ready Preview Nov 9, 2026 1:02pm UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-cloudflare-deployment-typescript.sparkling-queen-af32.workers.dev (commit cc10340)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://430dc41e-typescript.sparkling-queen-af32.workers.dev cc10340 2026-11-09T13:04:33.803Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
021f71c 2026-11-09T12:50:53.273Z View logs ↗

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@amrabed
amrabed marked this pull request as ready for review November 9, 2026 13:08
@amrabed
amrabed merged commit 5230ec7 into main Nov 9, 2026
6 checks passed
@amrabed
amrabed deleted the feat/cloudflare-deployment branch November 9, 2026 13:08

This branch was successfully deployed

2 active (1 outdated) deployments
Preview — cc10340b Deployed Nov 9, 2026 by vercel[bot]
preview — 021f71ce Deployed Nov 9, 2026 by amrabed via deploy-cloudflare #81
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