feat(docs): 文档站发布到 GitHub Pages 并加 Actions 自动部署#424
Merged
Conversation
把 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。
a4042b8 to
b2eacd2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什么
把 botmux 的 rspress 文档站发布到 https://deepcoldy.github.io/botmux/ 作为公开主站,并加 GitHub Actions 让以后改文档自动发布。飞书妙搭那份保留为国内镜像(
deploy.sh手动发,链路不受影响)。改动
docs-site/rspress.config.tsassetPrefix支持BOTMUX_DOCS_ASSET_PREFIX覆盖(默认值不变,仍是妙搭用的 jsDelivr CDN)。Pages 原生服务 static → 用/botmux/同源子路径,无需 CDN 绕圈。.github/workflows/docs-deploy.yml(新)docs-site/**时构建(BOTMUX_DOCS_BASE=/botmux/+BOTMUX_DOCS_ASSET_PREFIX=/botmux/),只替换deepcoldy.github.iogh-pages 分支的botmux/子树,保留根跳转与同域其它路径。鉴权用仓库 secretPAGES_DEPLOY_KEY。README.md/README.en.md/botmux/,en/botmux/en/,清爽 URL)。docs-site/README.md影响面
assetPrefix默认值不变 → 妙搭deploy.sh链路零影响。docs-site/**时触发;secret 不暴露给 fork PR。验证
/botmux/→ 200,文档正常渲染(侧边栏 / 内容 / 搜索 / TOC)/botmux/quickstart清爽 URL → 200(Pages 自动.html回退).mdx页multi-bot、en/变体)均 200docs-site本地pnpm build(Pages 模式)产物 0 处 jsDelivr 残留、资源全走/botmux/static/pnpm build)绿