Skip to content

发布方式

本文档站使用 VitePress 构建,Cloudflare Pages 发布。

Source of truth

text
Repository
  -> docs/book
  -> docs/book/.vitepress
  -> docs/book/public

Build output
  -> dist/docs-book

Public docs
  -> docs.monopolyfun.app

构建命令

bash
pnpm docs:book:build

本地预览:

bash
pnpm docs:book:dev

GitHub Actions

Workflow:

text
.github/workflows/cloudflare-pages-docs.yml

触发条件:

触发说明
push to master仅 docs/book、scripts/docs、package、lockfile 或 workflow 变化
workflow_dispatch手动发布

Secrets:

text
CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID

Cloudflare Pages

设置
Project namemonopolyfun-docs
Production branchmaster
Framework presetNone
Build commandpnpm docs:book:build
Build output directorydist/docs-book
Custom domaindocs.monopolyfun.app

手动发布

bash
pnpm docs:book:deploy

该命令先构建 dist/docs-book,再执行 Wrangler Pages deploy。

Released under the MIT License.