docs: crd descriptions (#59) #149
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: CI/CD | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| packages: write | |
| issues: write | |
| pages: write | |
| id-token: write | |
| env: | |
| PYTHON_VERSION: "3.10" | |
| NODE_LTS_VERSION: "22.x" | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| check-markdown: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Markdown links | |
| uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
| with: | |
| use-quiet-mode: 'yes' | |
| use-verbose-mode: 'yes' | |
| folder-path: '.' | |
| config-file: '.github/markdown-link-check-config.json' | |
| check-tokens: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Tokens | |
| run: | | |
| make check-tokens | |
| build-site: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Build Site | |
| run: | | |
| make site-build | |
| - name: Upload Site Artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy-preview: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-24.04 | |
| needs: build-site | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Build Site | |
| run: make site-build | |
| - name: Deploy to Netlify | |
| uses: nwtgck/actions-netlify@v3.0 | |
| with: | |
| publish-dir: './site' | |
| production-branch: main | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: "Deploy from GitHub Actions" | |
| enable-pull-request-comment: true | |
| enable-commit-comment: true | |
| overwrites-pull-request-comment: true | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| validate-mcp: | |
| name: Validate MCP Server | |
| defaults: | |
| run: | |
| working-directory: ./mcp/ai-developer-guide-mcp | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_LTS_VERSION }} | |
| - name: Install Dependencies | |
| run: make init | |
| - name: Lint | |
| run: make lint | |
| - name: Build | |
| run: make build | |
| - name: Test with Coverage | |
| run: make test | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mcp-build-artifacts | |
| path: ./mcp/ai-developer-guide-mcp/artifacts/ | |
| upload-coverage: | |
| name: Upload Coverage | |
| needs: validate-mcp | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: ./mcp/ai-developer-guide-mcp | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download Build Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: mcp-build-artifacts | |
| path: ./artifacts | |
| - name: Skip Coverage Upload (Running Locally) | |
| if: ${{ env.ACT }} | |
| run: | | |
| echo "ℹ️ Skipping coverage upload when running locally with 'act'" | |
| echo " Coverage upload requires GitHub tokens that are not available locally" | |
| echo " Coverage reports are available in ./artifacts/coverage/" | |
| - name: Upload Coverage | |
| if: ${{ !env.ACT }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| directory: ./artifacts/coverage | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: mcp-server | |
| release: | |
| needs: [check-markdown, check-tokens, build-site, validate-mcp] | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| released: ${{ steps.release-please.outputs.release_created }} | |
| tag: ${{ steps.release-please.outputs.tag_name }} | |
| steps: | |
| - name: Skip Release (Running Locally) | |
| if: ${{ env.ACT }} | |
| run: | | |
| echo "ℹ️ Skipping release when running locally with 'act'" | |
| echo " Release creation requires GitHub tokens that are not available locally" | |
| echo " In production, this job uses Release Please to manage versioning and releases" | |
| - name: Create Release | |
| if: ${{ !env.ACT }} | |
| uses: googleapis/release-please-action@v4 | |
| id: release-please | |
| with: | |
| manifest-file: .github/release-please-manifest.json | |
| config-file: .github/release-please-config.json | |
| deploy-site: | |
| needs: [release, build-site] | |
| if: ${{ needs.release.outputs.released }} | |
| runs-on: ubuntu-24.04 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| if: ${{ !env.ACT }} | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| release-mcp: | |
| name: Release MCP Server to NPM | |
| needs: [release] | |
| if: ${{ needs.release.outputs.released }} | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: ./mcp/ai-developer-guide-mcp | |
| steps: | |
| - name: Checkout | |
| if: ${{ !env.ACT }} | |
| uses: actions/checkout@v4 | |
| - name: Setup Node for Release | |
| if: ${{ !env.ACT }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_LTS_VERSION }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install Dependencies | |
| if: ${{ !env.ACT }} | |
| run: make init | |
| - name: Build Distributable | |
| if: ${{ !env.ACT }} | |
| run: make build | |
| - name: Publish to NPM | |
| if: ${{ !env.ACT }} | |
| run: | | |
| if [ "$NODE_AUTH_TOKEN" == "" ]; then | |
| echo "The 'NPM_TOKEN' secret must be set to deploy to NPM" | |
| exit 1 | |
| else | |
| echo "Publishing to NPM..." | |
| npm publish --access=public | |
| fi | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Publish to GitHub Packages | |
| if: ${{ !env.ACT }} | |
| run: | | |
| npm set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }} | |
| npm publish --registry https://npm.pkg.github.com | |
| release-mcp-docker: | |
| name: Release MCP Server Docker Image | |
| needs: [release] | |
| if: ${{ needs.release.outputs.released }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| defaults: | |
| run: | |
| working-directory: ./mcp/ai-developer-guide-mcp | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| VERSION=${{ needs.release.outputs.tag }} | |
| echo "version=${VERSION#v}" >> $GITHUB_OUTPUT | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./mcp/ai-developer-guide-mcp | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/ai-developer-guide-mcp:${{ steps.version.outputs.version }} | |
| ghcr.io/${{ github.repository_owner }}/ai-developer-guide-mcp:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| release-mcp-helm: | |
| name: Release MCP Server Helm Chart | |
| needs: [release] | |
| if: ${{ needs.release.outputs.released }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| VERSION=${{ needs.release.outputs.tag }} | |
| echo "version=${VERSION#v}" >> $GITHUB_OUTPUT | |
| - name: Package and push Helm chart | |
| run: | | |
| helm package ./mcp/ai-developer-guide-mcp/chart | |
| helm push ai-developer-guide-mcp-${{ steps.version.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}/charts |