openpress-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseopen-press Deploy
open-press 部署
open-press deploy owns the public-release gate. Use it only when the user asks to configure, inspect, dry-run, or publish an open-press document.
open-press deploy 负责公开发布的管控环节。仅当用户要求配置、检查、试运行或发布open-press文档时使用该工具。
Responsibilities
职责
- Inspect deploy config in under the
openpress/settings.jsonfield."deploy" - Check target adapter, staging source, project name, and confirmation settings.
- Run deploy preflight and dry runs.
- Keep secrets out of source files.
- Require explicit confirmation before publishing.
- Report the public URL and, when included, the PDF URL after successful deploy.
- 检查 中
openpress/settings.json字段下的部署配置。"deploy" - 核查目标适配器、预发布源、项目名称及确认设置。
- 执行部署预检查和试运行。
- 确保敏感信息不进入源文件。
- 发布前需用户明确确认。
- 部署成功后报告公共URL,若包含PDF则同时报告PDF URL。
Boundaries
边界
- owns generic CLI usage, non-deploy validation, local review, and the source/generated boundary.
openpress - owns page artifact content and visual readiness.
openpress-create-pages - owns slide deck content and visual readiness.
openpress-create-slide - This skill owns public target confirmation and deploy execution.
- 负责通用CLI使用、非部署验证、本地审核及源文件/生成文件的边界管理。
openpress - 负责页面产物内容及视觉就绪性。
openpress-create-pages - 负责幻灯片内容及视觉就绪性。
openpress-create-slide - 本工具负责公共目标确认及部署执行。
Public Deploy Rule
公开发布规则
Never publish without a clear confirmation that names the target project.
Good confirmation shape:
txt
This will publish the current open-press build to Cloudflare Pages project `<projectName>` from `<deploy.source>`.
Do you want me to deploy now?未得到明确指定目标项目的确认时,绝不能发布。
标准确认话术示例:
txt
This will publish the current open-press build to Cloudflare Pages project `<projectName>` from `<deploy.source>`.
Do you want me to deploy now?Preflight
预检查
Before real deploy, run the commands that prove the output is ready:
bash
npm run build # validates + renders dist-react/Also scan public-facing source for unfinished markers:
bash
rg "\\[TODO:|\\[FIX:|\\[DRAFT:" "press/*/chapters" press/design.md正式部署前,执行以下命令验证输出内容是否就绪:
bash
npm run build # validates + renders dist-react/同时扫描面向公众的源文件,查找未完成标记:
bash
rg "\\[TODO:|\\[FIX:|\\[DRAFT:" "press/*/chapters" press/design.mdPDF Size Limit
PDF大小限制
Cloudflare Pages rejects any single file larger than 25 MB. A multi-press or image-heavy PDF commonly exceeds this limit.
Unless the user explicitly asks to publish the PDF, deploy without it:
bash
npm run openpress:deploy -- --confirm --no-pdf--no-pdfIf the user wants to check the PDF size first:
bash
npm run openpress:pdf
du -sh .deploy/**/*.pdf 2>/dev/nullIf the PDF is over 25 MB and the user still wants it publicly hosted, recommend
a separate host (Cloudflare R2, S3, etc.). OpenPress does not currently expose
an authored external-PDF URL field, so do not invent one in
; report the separate URL in the delivery handoff.
openpress/settings.jsonCloudflare Pages 拒绝任何单个文件超过25 MB的内容。多文档或图片密集型PDF通常会超出此限制。
除非用户明确要求发布PDF,否则部署时不包含PDF:
bash
npm run openpress:deploy -- --confirm --no-pdf--no-pdf如果用户希望先检查PDF大小:
bash
npm run openpress:pdf
du -sh .deploy/**/*.pdf 2>/dev/null若PDF超过25 MB但用户仍希望公开托管,建议使用独立托管服务(如Cloudflare R2、S3等)。OpenPress目前未提供外部PDF URL的配置字段,请勿在中自行添加;在交付时告知用户独立托管的URL即可。
openpress/settings.jsonDeploy Commands
部署命令
Dry run:
bash
npm run openpress:deploy:dry-run -- --no-pdfPublish after explicit confirmation:
bash
npm run openpress:deploy -- --confirm --no-pdfRemove only when the user explicitly includes the PDF in the
confirmed publication target.
--no-pdf试运行:
bash
npm run openpress:deploy:dry-run -- --no-pdf获得明确确认后发布:
bash
npm run openpress:deploy -- --confirm --no-pdf仅当用户明确确认发布目标包含PDF时,才移除参数。
--no-pdfWhen To Read References
何时查阅参考文档
- Read when creating or repairing Cloudflare Pages config, project setup, Wrangler auth expectations, or UI deploy-button behavior.
references/cloudflare-pages.md
- 当创建或修复Cloudflare Pages配置、项目设置、Wrangler认证要求或UI部署按钮行为时,查阅。
references/cloudflare-pages.md