TST/DOC: set up doctesting #732
Workflow file for this run
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: [main] | |
| pull_request: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| docs-build: | |
| name: Build | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 | |
| with: | |
| pixi-version: v0.76.2 | |
| cache: true | |
| environments: docs | |
| - name: Build Docs | |
| run: pixi run docs | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: docs-build | |
| path: docs/sphinx/build/ | |
| docs-deploy: | |
| name: Deploy | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| needs: docs-build | |
| runs-on: ubuntu-slim | |
| permissions: | |
| contents: write # needed for the deploy step | |
| environment: | |
| name: docs-deploy | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Download Artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: docs-build | |
| path: docs/sphinx/build/ | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0 | |
| with: | |
| folder: docs/sphinx/build/ | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} |