build-deploy-docs #3
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: build-deploy-docs | |
| on: | |
| # push: | |
| # branches: | |
| # - '!gh-pages' | |
| # pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| PUDL_OUTPUT: /home/runner/pudl-work/output/ | |
| PUDL_INPUT: /home/runner/pudl-work/input/ | |
| DAGSTER_HOME: /home/runner/pudl-work/dagster_home/ | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install pudl environment with pixi | |
| uses: prefix-dev/[email protected] | |
| with: | |
| locked: true | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
| - name: Make input, output and dagster dirs | |
| run: mkdir -p ${{ env.PUDL_OUTPUT }} ${{ env.PUDL_INPUT}} ${{ env.DAGSTER_HOME }} | |
| - name: Lint and build PUDL documentation with Sphinx | |
| run: | | |
| pixi run docs-build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| # if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v20') }} | |
| with: | |
| publish_branch: gh-pages | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/_build/html | |
| force_orphan: true | |
| user_name: "pudlbot" | |
| user_email: "[email protected]" |