Skip to content

Commit 38826b8

Browse files
Jocsclaude
andauthored
ci(website): enable Preview URLs on the Worker (#4311)
Sets preview_urls = true in wrangler.toml so future wrangler versions upload runs emit a per-version URL (https://pr-NNN-marktext-website.<subdomain>.workers.dev). After this merge, the develop wrangler deploy will push the configuration change to the Worker; subsequent PRs will get a real preview URL in the sticky comment instead of the preview-disabled notice. Also updates the wrangler.toml comment to point at src/middleware.ts for the www→apex redirect (was previously next.config.ts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent eac661e commit 38826b8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/website/wrangler.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ main = ".open-next/worker.js"
33
compatibility_date = "2025-05-01"
44
compatibility_flags = ["nodejs_compat"]
55

6+
# Enables versioned preview URLs like
7+
# https://pr-NNN-marktext-website.<subdomain>.workers.dev which the CI workflow
8+
# parses out of `wrangler versions upload` output and posts back to PRs.
9+
preview_urls = true
10+
611
[assets]
712
directory = ".open-next/assets"
813
binding = "ASSETS"
@@ -11,8 +16,7 @@ binding = "ASSETS"
1116
# Cloudflare account as CLOUDFLARE_API_TOKEN (verified 2026-05-29), so wrangler
1217
# creates the route + DNS record for each automatically. If either hostname has
1318
# an existing A/AAAA/CNAME record, delete it first or the deploy will refuse to
14-
# bind. The Worker (via next.config.ts redirects) sends www -> apex with 301 so
15-
# only the canonical hostname is indexed.
19+
# bind. www → apex 301 redirect lives in src/middleware.ts.
1620
[[routes]]
1721
pattern = "marktext.me"
1822
custom_domain = true

0 commit comments

Comments
 (0)