Skip to content

feat: publishing manifests for MCP registry, Claude Code, and Gemini CLI #208

feat: publishing manifests for MCP registry, Claude Code, and Gemini CLI

feat: publishing manifests for MCP registry, Claude Code, and Gemini CLI #208

name: Update Documentation and Build Website
on:
push:
branches: [main]
paths:
- 'clio-kit-website/**'
- 'clio-kit-mcp-servers/**'
- 'scripts/**'
- '.github/workflows/docs-and-website.yml'
pull_request:
branches: [main, dev]
paths:
- 'clio-kit-website/**'
- 'clio-kit-mcp-servers/**'
- 'scripts/**'
- '.github/workflows/docs-and-website.yml'
permissions:
contents: write
pull-requests: write
jobs:
# Job 1: Build and test documentation (runs on all branches/PRs)
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref || github.ref }}
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install root dependencies
run: |
if [ -f pyproject.toml ]; then
uv sync
fi
- name: Pre-sync MCP server environments
run: |
for dir in clio-kit-mcp-servers/*/; do
if [ -f "$dir/pyproject.toml" ]; then
echo "Syncing $(basename $dir)..."
(cd "$dir" && uv sync --all-extras --dev) || echo "Warning: sync failed for $(basename $dir)"
fi
done
# Update README files (for PRs to main branch)
- name: Update MCP README files
if: github.event_name == 'pull_request' && github.base_ref == 'main'
run: python3 scripts/readme_filler.py clio-kit-mcp-servers
- name: Commit README updates
if: github.event_name == 'pull_request' && github.base_ref == 'main'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [[ -n $(git status --porcelain) ]]; then
git add clio-kit-mcp-servers/*/README.md
git commit -m "Auto-update MCP README files"
git push
else
echo "No README changes to commit"
fi
# Generate and build documentation
- name: Generate Docusaurus documentation
run: |
python3 scripts/generate_docs.py clio-kit-mcp-servers clio-kit-website/docs
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Node.js dependencies
working-directory: ./clio-kit-website
run: npm install
- name: Build Docusaurus website
working-directory: ./clio-kit-website
run: npm run build
# Store build artifacts for deployment job (only on main pushes)
- name: Upload build artifacts
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: docs-build
path: ./clio-kit-website/build
retention-days: 1
# Job Summary
- name: Job Summary
run: |
echo "## Documentation Build Summary" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Generated Docusaurus documentation" >> $GITHUB_STEP_SUMMARY
echo "- ✅ Built website successfully" >> $GITHUB_STEP_SUMMARY
if [ "${{ github.event_name }}" = "pull_request" ] && [ "${{ github.base_ref }}" = "main" ]; then
echo "- 📝 Updated README files" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ github.ref }}" = "refs/heads/main" ] && [ "${{ github.event_name }}" = "push" ]; then
echo "- 📦 Build artifacts ready for deployment" >> $GITHUB_STEP_SUMMARY
fi
# Job 2: Deploy to GitHub Pages (only runs on main branch pushes)
deploy:
name: Deploy to GitHub Pages
needs: build-docs
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: docs-build
path: ./build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: ./build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Deployment Summary
run: |
echo "## Deployment Summary" >> $GITHUB_STEP_SUMMARY
echo "- 🚀 Successfully deployed to GitHub Pages" >> $GITHUB_STEP_SUMMARY
echo "- 🔗 Website URL: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY