name: User Guide Generator on: push: branches: - doc paths: - 'doc/**' - 'mkdocs.yml' - '.github/workflows/docs.yml' pull_request: types: [opened, synchronize, reopened, labeled] paths: - 'doc/**' - 'mkdocs.yml' - '.github/workflows/docs.yml' 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@v4 with: fetch-depth: 0 # Needed for git-revision-date-localized plugin - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies run: | pipx install mkdocs pipx inject mkdocs mkdocs-material pipx inject mkdocs pymdown-extensions pipx inject mkdocs mkdocs-callouts - name: Build documentation run: mkdocs build - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 with: path: site/ deploy: if: github.ref == 'refs/heads/doc' && github.event_name == 'push' 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@v4