Skip to content

Commit acb09db

Browse files
committed
Add cache
1 parent ef24003 commit acb09db

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,19 @@ jobs:
8484
- name: Checkout code
8585
uses: actions/checkout@v4
8686

87+
# This will restore the cache for the current commit if it exists, or the most recent lychee
88+
# cache otherwise (including those saved for the main branch). It will also save the cache at
89+
# for the current commit if none existed for it, and only if the link check succeeded. We
90+
# don't want to save a cache when the action failed, because the reason for failure might be
91+
# temporary (rate limiting, network issue, etc.), and we always want to retry those links
92+
# everytime this action is run.
93+
- name: Restore lychee cache
94+
uses: actions/cache@v4
95+
with:
96+
path: .lycheecache
97+
key: cache-lychee-${{ github.sha }}
98+
restore-keys: cache-lychee-
99+
87100
- name: Link Checker
88101
uses: lycheeverse/lychee-action@v2
89102
with:

0 commit comments

Comments
 (0)