vinext 构建为 Cloudflare Worker。日常发布由 GitHub Actions 完成;本页面解释运行时配置和排查边界。
The Living Index builds to a Cloudflare Worker through vinext. GitHub Actions owns routine releases; this page explains runtime configuration and troubleshooting boundaries.
Runtime configuration / 运行时配置
wrangler.jsonc defines:
Build output and public assets / 构建产物与公开资源
npm run build produces dist/. Files under public/ become same-origin static assets, including:
app/generated/scene-config.ts. At runtime it fetches JSON for editorial content and uses the generated snapshot for the published scene. Custom GLBs load from their same-origin /uploads/models/<uuid>.glb paths.
应用 bundle 会导入 app/generated/scene-config.ts。运行时从 JSON 读取编辑内容,并使用生成快照作为发布场景;自定义 GLB 从同源 /uploads/models/<uuid>.glb 加载。
Canonical deployment / 标准部署
npm run deploy with repository secrets after the quality job succeeds.
质量 Job 成功后,GitHub workflow 使用仓库 Secrets 运行 npm run deploy。
Manual deployment / 手工部署
本机直接部署只用于首次 Cloudflare 配置或受控诊断,不属于普通内容与功能更新流程。它需要本机 Cloudflare 凭证,并会绕过 GitHub 的审查记录。 A local direct deployment is only for initial Cloudflare setup or controlled diagnosis. It is not the normal content or feature workflow. It requires local Cloudflare credentials and bypasses the GitHub review record.Caching / 缓存
- Hashed JS and CSS bundles can use long-lived caching. / 带 hash 的 JS/CSS 可以长缓存。
- HTML should update quickly after deployment. / HTML 应在部署后快速更新。
- UUID model paths are content-address-like in practice; replacement creates a new file path. / UUID 模型路径在实际使用中近似内容寻址;替换会产生新路径。
site-content.jsonis fetched withcache: "no-store"by the client. / 客户端以cache: "no-store"请求内容 JSON。- A browser draft is not a Cloudflare cache. Normal routes ignore it;
?studio=1may restore it locally. / 浏览器草稿不是 Cloudflare 缓存;普通路由忽略它,?studio=1才可能恢复。
Post-deployment checks / 部署后检查
- Confirm the latest GitHub Actions run completed successfully. / 确认最新 Actions 运行成功。
- Open a normal route without
?studio=1and compare it with committed content. / 用不含?studio=1的普通路由核对已提交内容。 - Test Chinese and English. / 测试中英文。
- Open an enabled built-in and an interactive custom asset. / 打开一个启用的内置物件和一个交互自定义资产。
- Verify GLBs return
200from/uploads/models/.... / 确认 GLB URL 返回200。 - Test a deep link and browser Back behavior. / 测试深链接与浏览器返回。
- Use a private window when ruling out browser-specific state. / 排除浏览器本地状态时使用无痕窗口。