Skip to content

Commit 1626a43

Browse files
committed
docs: add cache to PR workflows
`actions/setup-python` poetry cache feature requires poetry to be installed beforehand. It makes use of it extremely awkward. That is why `action/cache` is used istead.
1 parent 887b2c7 commit 1626a43

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/docs-pages.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ jobs:
2323
persist-credentials: false
2424
fetch-depth: 0
2525

26+
- uses: actions/cache@v4
27+
# actions/setup-python poetry cache feature requires poetry to be installed beforehand
28+
# which makes use of it extremely awkward.
29+
with:
30+
path: |
31+
/home/runner/.cache/pip
32+
/home/runner/.cache/pypoetry
33+
# python and poetry version are in docs/pyproject.toml
34+
key: docs-cache-${{ runner.os }}-${{ hashFiles('docs/pyproject.toml', 'docs/Makefile') }}
35+
2636
- name: Set up Python
2737
uses: actions/setup-python@v5
2838
with:

.github/workflows/docs-pr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ jobs:
2626
persist-credentials: false
2727
fetch-depth: 0
2828

29+
- uses: actions/cache@v4
30+
# actions/setup-python poetry cache feature requires poetry to be installed beforehand
31+
# which makes use of it extremely awkward.
32+
with:
33+
path: |
34+
/home/runner/.cache/pip
35+
/home/runner/.cache/pypoetry
36+
# python and poetry version are in docs/pyproject.toml
37+
key: docs-cache-${{ runner.os }}-${{ hashFiles('docs/pyproject.toml', 'docs/Makefile') }}
38+
2939
- name: Set up Python
3040
uses: actions/setup-python@v5
3141
with:

0 commit comments

Comments
 (0)