name: Deploy Documentation on: push: branches: [main] paths: - 'docs-site/**' - 'docs/**' - 'crates/kingfisher-rules/data/rules/**' - '.github/workflows/docs.yml' workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: "pages" cancel-in-progress: true jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: '3.12' - name: Install dependencies run: uv pip install --system -r docs-site/requirements.txt - name: Prepare documentation run: python3 docs-site/scripts/prepare-docs.py - name: Generate rules page run: python3 docs-site/scripts/generate-rules-page.py - name: Build site run: cd docs-site && mkdocs build --strict env: CI: true - name: Upload artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: docs-site/site deploy: 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@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0