feat(site): deploy as Cloudflare Worker with Static Assets#3
Merged
Conversation
site/wrangler.toml declares a pure-static Workers deployment serving site/dist/ via Workers Static Assets. No worker entry needed — the Cloudflare-managed asset router handles routing; `not_found_handling = "404-page"` falls through to Astro's 404.html so missing routes look right and Pagefind URLs resolve correctly. deploy-site.yml runs on push to main when site/** or nyuchi-docs-search/** change. The search package must build first because site imports its compiled ./plugin entry from dist/. Build sets PUBLIC_SHAMWARI_AI_URL pointing at the live AI Search proxy worker. Live: https://nyuchi-docs.nyuchi.workers.dev (42 pages, 116 assets). Smoke-checked: home / deep routes / 404 / pagefind asset all return expected status codes against the deployed worker. docs.nyuchi.com cutover deferred to a separate step — the apex still points at the legacy Mintlify-on-Vercel project until the cut is made deliberately. Workspace bump: site/ gains wrangler ^4.68.1 as a devDependency.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
nyuchi-docs | 8ca5abe | Commit Preview URL Branch Preview URL |
May 24 2026, 10:16 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
shamwari-docs-ai | 8ca5abe | Commit Preview URL Branch Preview URL |
May 24 2026, 10:16 PM |
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
Deploys the new
sitepackage as a Cloudflare Worker with Static Assets instead of Vercel/Pages. The repo's been a workspace since Wave 3 butdocs.nyuchi.comwas still serving the old Mintlify-on-Vercel site (the new Astro Starlight site had no host at all).What landed
site/wrangler.toml— pure static.[assets] directory = "./dist",not_found_handling = "404-page"so missing routes fall through to Astro's 404 and Pagefind URLs resolve to real files..github/workflows/deploy-site.yml— push to main onsite/**ornyuchi-docs-search/**(since site imports the search package's compiled./plugin) → build search → build site (withPUBLIC_SHAMWARI_AI_URLset) →wrangler deploy.site/addswrangler ^4.68.1as a devDependency.Verified live
Deployed manually before opening this PR. Live at https://nyuchi-docs.nyuchi.workers.dev with all 42 pages + 116 assets. Smoke probe:
GET /→ 200 (24 KB)GET /platform/quickstart/→ 200GET /nothing→ 404 (Astro's 404 page)GET /pagefind/pagefind.js→ 200 (45 KB — Pagefind asset)docs.nyuchi.com cutover (NOT in this PR)
The apex still points at the legacy Mintlify-on-Vercel project (
prj_NdMUpHpUIb41Po1H8c6hrChv2bgr, not on the Nyuchi Web Services Vercel team). Cutover is a separate deliberate step — once you give the nod I'll attachdocs.nyuchi.comto this worker via the Workers custom-domain API (same path I used formcp.mzizi.dev— Cloudflare auto-creates the cert + CNAME sincenyuchi.comis on the account). The old project keeps its preview URLs alive but stops being authoritative.The AI Search crawler is currently indexed against
docs.nyuchi.comcontent, which is still the old site. Once the cutover happens, the next crawl picks up the new Astro Starlight content automatically.https://claude.ai/code/session_01RHdD3m5zeBYmYoUwxLwxKf
Generated by Claude Code