Skip to content

Commit 1cb2a32

Browse files
committed
Added caching, renamed workflow/step
1 parent d9c7ed6 commit 1cb2a32

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/validate-links-on-push-pr.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check links on push + PR
1+
name: Validate links on push + PR
22

33
on:
44
push:
@@ -19,7 +19,15 @@ jobs:
1919
- name: Checkout repository
2020
uses: actions/checkout@v6.0.2
2121

22-
- name: Check links
22+
- name: Restore lychee cache
23+
id: restore-cache
24+
uses: actions/cache/restore@v5.0.4
25+
with:
26+
path: .lycheecache
27+
key: cache-lychee-${{ github.sha }}
28+
restore-keys: cache-lychee-
29+
30+
- name: Validate links
2331
uses: lycheeverse/lychee-action@v2.8.0
2432
with:
2533
# Check all files, ignore ok/redir/blocked/rate-limited
@@ -30,3 +38,10 @@ jobs:
3038
--cache --max-cache-age 3d
3139
env:
3240
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
41+
42+
- name: Save lychee cache
43+
uses: actions/cache/save@v5.0.4
44+
if: always()
45+
with:
46+
path: .lycheecache
47+
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)