Move docs to the repo root #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: [dev] | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "docs-requirements.txt" | |
| - ".github/workflows/docs.yml" | |
| pull_request: | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "docs-requirements.txt" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -r docs-requirements.txt | |
| # --strict fails the build on a broken internal link, which is the whole | |
| # point of running this on PRs. | |
| - run: mkdocs build --strict | |
| - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| if: github.ref == 'refs/heads/dev' && github.event_name != 'pull_request' | |
| with: | |
| path: site | |
| deploy: | |
| needs: build | |
| if: github.ref == 'refs/heads/dev' && github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - id: deploy | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |