feat: add MkDocs documentation site with command catalog and JSON sch… #1
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "docs-src/**" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "docs-src/**" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uv sync --group docs | |
| - name: Validate YAML catalog and JSON schemas | |
| run: uv run python docs-src/scripts/validate_examples.py | |
| - name: Generate command reference pages | |
| run: uv run python docs-src/scripts/generate_docs.py | |
| build: | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uv sync --group docs | |
| - name: Generate command reference pages | |
| run: uv run python docs-src/scripts/generate_docs.py | |
| - name: Build MkDocs site | |
| run: uv run mkdocs build --strict | |
| - uses: actions/upload-pages-artifact@v4 | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| with: | |
| path: site/ | |
| deploy: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |