Appearance
部署说明(正式上线版)
正式域名:https://desk.taskkernel.xyz
推荐发布方式:一条命令串联
bash
npm run deploy:pages执行顺序:
npm run content:buildnpm run docs:buildwrangler pages deploy docs/.vitepress/distnpm run notify:telegram -- --from-file docs/deliveries/delivery-reading-desk-v1-production.md --base-url https://desk.taskkernel.xyz
非破坏性验证(不真实部署)
bash
npm run deploy:pages -- --dry-run--dry-run 会执行内容构建和文档构建,并打印将执行的部署与通知动作,不会调用 Cloudflare 发布。
Cloudflare 变量
真实部署前需设置:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDCLOUDFLARE_PAGES_PROJECT_NAMECLOUDFLARE_PAGES_BRANCH(可选,默认main)
建议:
- token 仅授予 Pages Deploy 所需最小权限
- 不要把 token 写入仓库,使用本地环境变量或 CI Secret
Telegram 变量
通知默认 dry-run,真实发送需要:
TELEGRAM_DRY_RUN=falseTELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
单独测试通知:
bash
# 默认 dry-run 预览
npm run notify:telegram -- --from-file docs/deliveries/delivery-reading-desk-v1-production.md --base-url "https://desk.taskkernel.xyz"
# 真实发送
TELEGRAM_DRY_RUN=false \
TELEGRAM_BOT_TOKEN=xxx \
TELEGRAM_CHAT_ID=yyy \
npm run notify:telegram -- --from-file docs/deliveries/delivery-reading-desk-v1-production.md --base-url "https://desk.taskkernel.xyz"Cloudflare Pages 控制台构建配置(备用)
如果使用控制台自动构建:
- Root directory:
deliverables/delivery-reading-desk-v1 - Build command:
npm run content:build && npm run docs:build - Build output directory:
docs/.vitepress/dist