Skip to content

Commit e69291f

Browse files
author
smoench
committed
speedup sphinx build/linting with caching doctrees and pip cache
1 parent e6ee69a commit e69291f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yaml

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

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-
39+
3240
- name: "Install Sphinx"
3341
run: pip install --user sphinx
3442

3543
- name: "Install custom requirements via pip"
3644
run: pip install -r _build/.requirements.txt
3745

46+
- name: "Cache sphinx doctrees"
47+
uses: actions/cache@v1
48+
with:
49+
path: ./_build/doctrees
50+
key: ${{ runner.os }}-sphinx-doctrees
51+
3852
- name: "Build documentation"
3953
run: make -C _build SPHINXOPTS=-nW html
4054

0 commit comments

Comments
 (0)