name: Deploy docs to GitHub Pages # Build the Material for MkDocs site in website/ and publish it to GitHub Pages. # One-time setup: Settings -> Pages -> Source: "GitHub Actions". on: push: branches: [main] paths: - "website/**" - "CHANGELOG.md" - "CHANGELOG-Japanese.md" - ".github/workflows/docs.yml" workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: "3.x" cache: pip - name: Install dependencies run: pip install -r website/requirements.txt - name: Sync changelog into docs run: python website/scripts/sync_changelog.py - name: Build site (strict) run: mkdocs build --strict --config-file website/mkdocs.yml - name: Configure Pages uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 - name: Upload artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: website/site deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1