Release v1.0.0: Unified CLI with mcp-server/prompt subcommands, stand… #200
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
| name: Update Documentation and Build Website | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'agent-toolkit-website/**' | |
| - 'agent-toolkit-mcp-servers/**' | |
| - 'scripts/generate_docs.py' | |
| - '.github/workflows/docs-and-website.yml' | |
| pull_request: | |
| branches: [main, dev] | |
| paths: | |
| - 'agent-toolkit-website/**' | |
| - 'agent-toolkit-mcp-servers/**' | |
| - 'scripts/generate_docs.py' | |
| - '.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 Python dependencies | |
| run: | | |
| if [ -f pyproject.toml ]; then | |
| uv sync | |
| fi | |
| # Update README files (for PRs to dev branch) | |
| - name: Update MCP README files | |
| if: github.event_name == 'pull_request' && github.base_ref == 'dev' | |
| run: python3 scripts/readme_filler.py agent-toolkit-mcp-servers | |
| - name: Commit README updates | |
| if: github.event_name == 'pull_request' && github.base_ref == 'dev' | |
| 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 agent-toolkit-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 agent-toolkit-mcp-servers agent-toolkit-website/docs | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Install Node.js dependencies | |
| working-directory: ./agent-toolkit-website | |
| run: npm install | |
| - name: Build Docusaurus website | |
| working-directory: ./agent-toolkit-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: ./agent-toolkit-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 }}" = "dev" ]; 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 |