用途
deploy-docs 是一个文档部署准备命令,用于验证文档站点并准备将其部署到 GitHub Pages。它属于 everyinc/compound-engineering-plugin 项目,帮助维护者在发布文档前完成必要的检查与配置。
主要能力
该命令按步骤执行以下工作:
-
验证文档:统计 agents 与 skills 组件数量,校验
.claude-plugin/marketplace.json和plugins/compound-engineering/.claude-plugin/plugin.json的 JSON 格式是否有效,并检查 index、agents、commands、skills、mcp-servers、changelog、getting-started 等 HTML 页面是否存在。 -
检查未提交更改:通过
git status --porcelain plugins/compound-engineering/docs/检查文档目录是否有未提交的更改,若有则提醒用户先提交。 -
提供部署说明:由于 GitHub Pages 部署需要具有特殊权限的工作流文件,命令会给出首次设置与部署步骤,并附上工作流文件内容。
-
报告状态:输出部署就绪情况摘要,包括 HTML 页面是否齐全、JSON 文件是否有效、组件数量是否匹配,并列出后续步骤。
使用方式
命令中给出的检查命令包括:
echo "Agents: $(ls plugins/compound-engineering/agents/*.md | wc -l)"
echo "Skills: $(ls -d plugins/compound-engineering/skills/*/ 2>/dev/null | wc -l)"
cat .claude-plugin/marketplace.json | jq . > /dev/null && echo "✓ marketplace.json valid"
cat plugins/compound-engineering/.claude-plugin/plugin.json | jq . > /dev/null && echo "✓ plugin.json valid"
检查 HTML 页面:
for page in index agents commands skills mcp-servers changelog getting-started; do
if [ -f "plugins/compound-engineering/docs/pages/${page}.html" ] || [ -f "plugins/compound-engineering/docs/${page}.html" ]; then
echo "✓ ${page}.html exists"
else
echo "✗ ${page}.html MISSING"
fi
done
检查未提交更改:
git status --porcelain plugins/compound-engineering/docs/
首次设置步骤:创建 .github/workflows/deploy-docs.yml 工作流文件;进入仓库 Settings > Pages;将 Source 设置为 "GitHub Actions"。
部署方式:合并到 main 后文档会自动部署;或进入 Actions 标签页,选择 "Deploy Documentation to GitHub Pages",点击 "Run workflow"。
工作流文件内容:
name: Deploy Documentation to GitHub Pages
on:
push:
branches: [main]
paths:
- 'plugins/compound-engineering/docs/**'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: 'plugins/compound-engineering/docs'
- uses: actions/deploy-pages@v4
适用场景
适用于 everyinc/compound-engineering-plugin 项目的文档维护者,在将文档发布到 GitHub Pages 之前进行验证与准备。
限制
资料中未提供该命令的收费、价格、平台支持范围等额外信息。