Skip to content

Commit d1509c0

Browse files
authored
Merge pull request #330 from pestphp/feature/ci-lychee
ci: fix lychee link checker
2 parents 21ac1e6 + a7ad5cc commit d1509c0

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/link_check.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,15 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16+
- name: Restore lychee cache
17+
uses: actions/cache@v4
18+
with:
19+
path: .lycheecache
20+
key: cache-lychee-${{ github.sha }}
21+
restore-keys: cache-lychee-
22+
1623
- name: 🔗 Check Links
17-
uses: lycheeverse/lychee-action@v1.10.0
24+
uses: lycheeverse/lychee-action@v2
1825
with:
19-
fail: true
20-
args: --config .github/workflows/lychee.toml './**/*.md'
26+
jobSummary: true
27+
args: --base . --cache --max-cache-age 1d --config .github/workflows/lychee.toml './**/*.md'

.github/workflows/lychee.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,13 @@ include_verbatim = false
8888
glob_ignore_case = false
8989

9090
# Exclude URLs and mail addresses from checking (supports regex).
91-
#exclude = [ '.*\.github.com\.*' ]
9291
# receiving forbidden but valid link, receiving timeout but valid link
93-
exclude = ['https://opensource.org/licenses/MIT', 'https://twitter.com/pestphp', '^https://laracasts.com/series/(pest-driven-laravel|pest-from-scratch)$']
94-
92+
exclude = [
93+
'https://opensource.org/licenses/MIT',
94+
'https://twitter.com/pestphp',
95+
'^https://laracasts.com/series/(pest-driven-laravel|pest-from-scratch)$',
96+
'^https://www.linkedin.com/learning/.*$',
97+
]
9598

9699
# Exclude these filesystem paths from getting checked.
97100
#exclude_path = ["file/path/to/Ignore", "./other/file/path/to/Ignore"]

0 commit comments

Comments
 (0)