Skip to content

Commit 2fc1e4b

Browse files
committed
rtd build fix
1 parent 5cecb79 commit 2fc1e4b

2 files changed

Lines changed: 27 additions & 20 deletions

File tree

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
1-
name: Publish Read the Docs
1+
name: Docs
22

33
on:
44
push:
55
branches:
66
- master
7+
- '*'
78
tags:
89
- '**'
10+
pull_request:
11+
branches:
12+
- master
913

1014
jobs:
11-
publish:
15+
docs:
16+
name: "docs"
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
cache: pip
24+
- name: install dependencies
25+
run: |
26+
pip install -e ".[html]"
27+
pip install sphinx -r docs/requirements.txt
28+
- name: build docs
29+
run: sphinx-build -W -b html docs docs/_build/html
30+
- name: run doctests
31+
run: sphinx-build -b doctest docs docs/_build/doctest
32+
33+
publish_rtd:
34+
name: "publish read the docs"
35+
needs: docs
36+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
1237
runs-on: ubuntu-latest
1338
env:
1439
RTD_API_TOKEN: ${{ secrets.RTD_API_TOKEN }}

.github/workflows/tests.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,6 @@ jobs:
6161
- name: run django tests
6262
run: tox -e ${{ matrix.tox }}
6363

64-
docs:
65-
name: "docs"
66-
runs-on: ubuntu-latest
67-
steps:
68-
- uses: actions/checkout@v4
69-
- uses: actions/setup-python@v5
70-
with:
71-
python-version: '3.12'
72-
cache: pip
73-
- name: install dependencies
74-
run: |
75-
pip install -e ".[html]"
76-
pip install sphinx -r docs/requirements.txt
77-
- name: build docs
78-
run: sphinx-build -W -b html docs docs/_build/html
79-
- name: run doctests
80-
run: sphinx-build -b doctest docs docs/_build/doctest
81-
8264
typecheck:
8365
name: "typecheck"
8466
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)