prodigy 0.4.4

Turn ad-hoc Claude sessions into reproducible development pipelines with parallel AI agents
Documentation
name: Deploy Documentation

on:
  push:
    branches: [main, master]
    paths:
      - 'book/**'
      - 'docs/**'
      - 'mkdocs.yml'
      - '.github/workflows/deploy-docs.yml'
  pull_request:
    branches: [main, master]
    paths:
      - 'book/**'
      - 'docs/**'
      - 'mkdocs.yml'
      - '.github/workflows/deploy-docs.yml'

env:
  # Toggle documentation format: 'mdbook' or 'mkdocs'
  # mdbook uses book/src/, MkDocs uses docs/ (separate sources)
  # MkDocs can be enhanced with Material features (admonitions, tabs, diagrams)
  DEPLOY_FORMAT: mkdocs

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: write  # Required to push to gh-pages branch
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      # Build mdbook
      - name: Setup mdBook
        if: env.DEPLOY_FORMAT == 'mdbook'
        uses: peaceiris/actions-mdbook@v2
        with:
          mdbook-version: 'latest'

      - name: Build mdbook
        if: env.DEPLOY_FORMAT == 'mdbook'
        run: mdbook build book

      # Build mkdocs
      - name: Setup Python
        if: env.DEPLOY_FORMAT == 'mkdocs'
        uses: actions/setup-python@v6
        with:
          python-version: '3.x'
          cache: 'pip'

      - name: Install MkDocs Material
        if: env.DEPLOY_FORMAT == 'mkdocs'
        run: pip install mkdocs-material

      - name: Build MkDocs
        if: env.DEPLOY_FORMAT == 'mkdocs'
        run: mkdocs build --strict

      # Deploy based on format
      - name: Deploy to GitHub Pages
        if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ${{ env.DEPLOY_FORMAT == 'mdbook' && './book/book' || './site' }}