Skip to content

Commit a50aa2b

Browse files
author
smoench
committed
speedup sphinx build/linting with caching doctrees and pip cache
1 parent 325c6d7 commit a50aa2b

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,29 @@ jobs:
2929
- name: "Install Sphinx dependencies"
3030
run: sudo apt-get install python-dev build-essential
3131

32-
- name: "Install Sphinx"
33-
run: pip install --user sphinx
32+
- name: "Cache pip"
33+
uses: actions/cache@v1
34+
with:
35+
path: ~/.cache/pip
36+
key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }}
37+
restore-keys: |
38+
${{ runner.os }}-pip-
3439
35-
- name: "Install custom requirements via pip"
40+
- name: "Install spinx + requirements via pip"
3641
run: pip install -r _build/.requirements.txt
3742

43+
- name: "Cache sphinx doctrees"
44+
uses: actions/cache@v1
45+
with:
46+
path: ./_build/doctrees
47+
key: ${{ runner.os }}-sphinx-doctrees
48+
49+
- name: "Cache sphinx html"
50+
uses: actions/cache@v1
51+
with:
52+
path: ./_build/html
53+
key: ${{ runner.os }}-sphinx-html
54+
3855
- name: "Build documentation"
3956
run: make -C _build SPHINXOPTS=-nW html
4057

0 commit comments

Comments
 (0)