Skip to content

feat(docs): 文档站发布到 GitHub Pages 并加 Actions 自动部署#424

Merged
deepcoldy merged 1 commit into
masterfrom
docs/github-pages-deploy
Jul 10, 2026
Merged

feat(docs): 文档站发布到 GitHub Pages 并加 Actions 自动部署#424
deepcoldy merged 1 commit into
masterfrom
docs/github-pages-deploy

Conversation

@deepcoldy

@deepcoldy deepcoldy commented Jul 10, 2026

Copy link
Copy Markdown
Owner

做了什么

把 botmux 的 rspress 文档站发布到 https://deepcoldy.github.io/botmux/ 作为公开主站,并加 GitHub Actions 让以后改文档自动发布。飞书妙搭那份保留为国内镜像deploy.sh 手动发,链路不受影响)。

改动

文件 改动
docs-site/rspress.config.ts assetPrefix 支持 BOTMUX_DOCS_ASSET_PREFIX 覆盖(默认值不变,仍是妙搭用的 jsDelivr CDN)。Pages 原生服务 static → 用 /botmux/ 同源子路径,无需 CDN 绕圈。
.github/workflows/docs-deploy.yml(新) push master 改动 docs-site/** 时构建(BOTMUX_DOCS_BASE=/botmux/ + BOTMUX_DOCS_ASSET_PREFIX=/botmux/),只替换 deepcoldy.github.io gh-pages 分支的 botmux/ 子树,保留根跳转与同域其它路径。鉴权用仓库 secret PAGES_DEPLOY_KEY
README.md / README.en.md 文档链接从 GitHub 源码树改指渲染好的 Pages 站(zh /botmux/,en /botmux/en/,清爽 URL)。
docs-site/README.md 记录 GitHub Pages(主站·自动)与妙搭(国内镜像·手动)两条发布链路。

影响面

  • 纯文档 / 发布链路改动,不碰 daemon / worker / 适配器 / IM 任何运行时代码。
  • assetPrefix 默认值不变 → 妙搭 deploy.sh 链路零影响
  • 新 workflow 只在 push master 且改 docs-site/** 时触发;secret 不暴露给 fork PR。

验证

  • /botmux/ → 200,文档正常渲染(侧边栏 / 内容 / 搜索 / TOC)
  • /botmux/quickstart 清爽 URL → 200(Pages 自动 .html 回退)
  • README 里替换后的清爽链接(含 .mdxmulti-boten/ 变体)均 200
  • docs-site 本地 pnpm build(Pages 模式)产物 0 处 jsDelivr 残留、资源全走 /botmux/static/
  • CI(pnpm build)绿

把 rspress 文档站发布到 https://deepcoldy.github.io/botmux/ 作为公开主站;
飞书妙搭那份保留为国内镜像(deploy.sh 手动发,不受影响)。

改了什么:
- rspress.config.ts:assetPrefix 改为可被 BOTMUX_DOCS_ASSET_PREFIX 覆盖(默认仍是
  妙搭用的 jsDelivr CDN)。GitHub Pages 原生服务 static,用 /botmux/ 同源子路径即可,
  不需要 CDN 绕圈。
- .github/workflows/docs-deploy.yml:push master 改动 docs-site/** 时,构建
  (BOTMUX_DOCS_BASE=/botmux/ + BOTMUX_DOCS_ASSET_PREFIX=/botmux/)后,只替换
  deepcoldy.github.io gh-pages 分支的 botmux/ 子树,保留根跳转与同域其它路径。
  鉴权用仓库 secret PAGES_DEPLOY_KEY(deploy key)。
- README.md / README.en.md:文档链接从 GitHub 源码树改指向渲染好的 Pages 站
  (中文 /botmux/,英文 /botmux/en/,清爽 URL)。
- docs-site/README.md:补充 GitHub Pages(主站·自动)与妙搭(国内镜像·手动)两条发布链路。

影响面:
- 纯文档/发布链路改动,不碰 daemon / worker / 适配器 / IM 任何运行时代码。
- assetPrefix 默认值不变 → 妙搭 deploy.sh 链路零影响。
- 新 workflow 只在 push master 且改 docs-site/** 时触发;secret 不暴露给 fork PR。
@deepcoldy deepcoldy force-pushed the docs/github-pages-deploy branch from a4042b8 to b2eacd2 Compare July 10, 2026 07:05
@deepcoldy deepcoldy merged commit 84e57e9 into master Jul 10, 2026
1 check passed
@deepcoldy deepcoldy deleted the docs/github-pages-deploy branch July 10, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant