name: deploy-pages on: push: branches: [main] workflow_dispatch: permissions: contents: read concurrency: group: pages cancel-in-progress: false jobs: build: runs-on: ubuntu-latest env: # Silence the MkDocs 2.0 banner. We pin to mkdocs-material 9.x in # requirements-docs.txt, so the upcoming breaking change doesn't # affect us until we explicitly upgrade. The variable name is read # by material/templates/__init__.py and stable across 9.x releases. NO_MKDOCS_2_WARNING: "1" steps: - uses: actions/checkout@v5 with: fetch-depth: 0 - uses: actions/setup-python@v6 with: python-version: "3.11" - name: Install MkDocs Material run: pip install -r requirements-docs.txt - name: Assemble docs run: bash scripts/build_site.sh - name: Build site run: mkdocs build -d site - uses: actions/upload-pages-artifact@v5 with: path: site deploy: # Publishing is owned by the canonical repository; forks still verify builds. if: github.repository == 'bojieli/ai-agent-book' needs: build permissions: pages: write id-token: write runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v5