Skip to content

feat: CI/CD pipeline optimization and health monitoring #512

feat: CI/CD pipeline optimization and health monitoring

feat: CI/CD pipeline optimization and health monitoring #512

Workflow file for this run

name: Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'src/**/cli/**'
- 'README.md'
- '*.md'
- 'pyproject.toml'
- '.github/workflows/docs.yml'
workflow_run:
workflows: ["Quality Checks", "Unit Tests"]
types: [completed]
branches: [main]
pull_request:
branches: [main]
paths:
- 'docs/**'
- 'src/**/cli/**'
- 'README.md'
- '*.md'
- 'pyproject.toml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
get-config:
name: Get Configuration
runs-on: ubuntu-latest
outputs:
default-python-version: ${{ steps.config.outputs.default-python-version }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Get project configuration
id: config
uses: ./.github/actions/get-config
setup-cache:
name: Setup Cache
needs: get-config
uses: ./.github/workflows/cache-management.yml
with:
cache-type: dependencies
cache-key-base: docs-deps
python-version: ${{ needs.get-config.outputs.default-python-version }}
build:
needs: [get-config, setup-cache]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Python and UV
uses: ./.github/actions/setup-uv-cached
with:
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
fail-on-cache-miss: false
- name: Configure Git for mike
run: make ci-git-setup
- name: Build documentation
run: |
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
# Build and deploy locally with mike (no push to remote)
make ci-docs-build-for-pages
else
# Build for PRs (validation only)
make ci-docs-build
fi
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v4
with:
path: docs/site
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4