Skip to content

Commit acb586f

Browse files
authored
Add GH Pages workflow (catalyst-cooperative#4823)
1 parent 7c68458 commit acb586f

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: build-deploy-docs
2+
3+
on:
4+
# push:
5+
# branches:
6+
# - '!gh-pages'
7+
# pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
env:
14+
PUDL_OUTPUT: /home/runner/pudl-work/output/
15+
PUDL_INPUT: /home/runner/pudl-work/input/
16+
DAGSTER_HOME: /home/runner/pudl-work/dagster_home/
17+
18+
jobs:
19+
docs:
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
shell: bash -l {0}
24+
steps:
25+
- uses: actions/checkout@v6
26+
with:
27+
fetch-depth: 2
28+
29+
- name: Install conda-lock environment with micromamba
30+
uses: mamba-org/setup-micromamba@v2
31+
with:
32+
environment-file: environments/conda-lock.yml
33+
environment-name: pudl-dev
34+
cache-environment: true
35+
36+
- name: Log environment details
37+
run: |
38+
conda info
39+
conda list
40+
conda config --show-sources
41+
conda config --show
42+
printenv | sort
43+
44+
- name: Make input, output and dagster dirs
45+
run: mkdir -p ${{ env.PUDL_OUTPUT }} ${{ env.PUDL_INPUT}} ${{ env.DAGSTER_HOME }}
46+
47+
- name: Lint and build PUDL documentation with Sphinx
48+
run: |
49+
pip install --no-deps --editable .
50+
make docs-build
51+
52+
- name: Deploy to GitHub Pages
53+
uses: peaceiris/actions-gh-pages@v4
54+
# if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v20') }}
55+
with:
56+
publish_branch: gh-pages
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
publish_dir: docs/_build/html
59+
force_orphan: true
60+
user_name: "pudlbot"
61+
user_email: "pudl@catalyst.coop"

0 commit comments

Comments
 (0)