Skip to content

Commit e333fa5

Browse files
ci: cached pip install step
Since this is one of the slowest actions it is good to cache.
1 parent 99d371a commit e333fa5

File tree

2 files changed

+36
-11
lines changed

2 files changed

+36
-11
lines changed

.github/workflows/push--deploy-github-pages.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,26 @@ jobs:
2929
- name: Setup Pages
3030
uses: actions/[email protected]
3131
- name: Set up Python
32-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v6.1.0
3333
with: { python-version: '3.x' }
3434
- name: Install pip
3535
run: python -m pip install --upgrade pip
36+
- name: Cache pip
37+
uses: actions/[email protected]
38+
with:
39+
path: ~/.cache/pip
40+
key: pip-${{ runner.os }}-${{ hashFiles('docs/requirements.txt') }}
41+
restore-keys: pip-${{ runner.os }}-
3642
- name: Install MkDocs and dependencies
37-
run: >
38-
pip install mkdocs==1.6.1 mkdocs-shadcn==0.9.8 Pygments==2.19.2
39-
mkdocstrings-python==2.0.1 pymdown-extensions==10.19.1
40-
click==8.3.1 ghp-import==2.1.0 jinja2==3.1.6 markdown==3.10
41-
markupsafe==3.0.3 mergedeep==1.3.4 mkdocs-get-deps==0.2.0
42-
pathspec==0.12.1 pyyaml-env-tag==1.1 pyyaml==6.0.3 bottle==0.13.4
43-
watchdog==6.0.0 gitpython==3.1.45 mkdocstrings==1.0.0 griffe==1.15.0
44-
mkdocs-autorefs==1.4.3 python-dateutil==2.9.0.post0 gitdb==4.0.12
45-
smmap==5.0.2 colorama==0.4.6 platformdirs==4.5.1 six==1.17.0
43+
run: pip install --requirement 'docs/requirements.txt'
4644
- name: Build site with MkDocs
4745
run: mkdocs --verbose --color build --site-dir ./_site
4846
- name: Restore lychee cache
4947
uses: actions/[email protected]
5048
id: restore-cache
5149
with:
5250
path: .lycheecache
53-
key: cache-docs-lychee-${{ github.sha }}
51+
key: cache-lychee-${{ hashFiles('docs/**/*.html', 'docs/**/*.htm') }}
5452
restore-keys: cache-docs-lychee-
5553
- name: Check the links
5654
uses: lycheeverse/[email protected]

docs/requirements.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
mkdocs==1.6.1
2+
mkdocs-shadcn==0.9.8
3+
Pygments==2.19.2
4+
mkdocstrings-python==2.0.1
5+
pymdown-extensions==10.19.1
6+
click==8.3.1
7+
ghp-import==2.1.0
8+
jinja2==3.1.6
9+
markdown==3.10
10+
markupsafe==3.0.3
11+
mergedeep==1.3.4
12+
mkdocs-get-deps==0.2.0
13+
pathspec==0.12.1
14+
pyyaml-env-tag==1.1
15+
pyyaml==6.0.3
16+
bottle==0.13.4
17+
watchdog==6.0.0
18+
gitpython==3.1.45
19+
mkdocstrings==1.0.0
20+
griffe==1.15.0
21+
mkdocs-autorefs==1.4.3
22+
python-dateutil==2.9.0.post0
23+
gitdb==4.0.12
24+
smmap==5.0.2
25+
colorama==0.4.6
26+
platformdirs==4.5.1
27+
six==1.17.0

0 commit comments

Comments
 (0)