Skip to content

Commit dd552ec

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 65289bf commit dd552ec

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@v6
2838
with:

.github/workflows/docs-pr.yml

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

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

0 commit comments

Comments
 (0)