name: Build documentation on: push: branches: - main paths: - 'docs/**' - pyproject.toml - poetry.lock workflow_dispatch: permissions: contents: read pages: write id-token: write jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main - name: Run tests run: nix develop --command -- poetry install && poetry run mkdocs build --strict - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ./site deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Configure Pages uses: actions/configure-pages@v4 - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4