Skip to content

Commit 35c2ba8

Browse files
committed
test: tweaking lychee setup
1 parent 7543b92 commit 35c2ba8

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

.github/workflows/linkcheck.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
name: Link check
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "03 22 * * *"
49

510
jobs:
611
linkcheck:
712
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
815
steps:
9-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1017
- name: Check links with Lychee
18+
id: lychee
1119
uses: lycheeverse/lychee-action@v2
1220
with:
13-
fail: true
21+
fail: false
1422
args: >-
23+
--root-dir "$(pwd)"
1524
--timeout 20
1625
--max-retries 3
17-
'**/*.md'
18-
'**/*.rst'
26+
--cache
27+
--max-cache-age 14d
28+
.
29+
- name: Create Issue From File
30+
if: steps.lychee.outputs.exit_code != 0
31+
uses: peter-evans/create-issue-from-file@v5
32+
with:
33+
title: Link Checker Report
34+
content-filepath: ./lychee/out.md
35+
labels: report, automated issue

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ repos:
1919
hooks:
2020
- id: lychee
2121
args: ["--no-progress", "--timeout", "10"]
22-
types: [markdown, rst]
23-
stages: [manual] # Run with: pre-commit run lychee --hook-stage manual
22+
#types: [markdown, rst]
23+
stages: [pre-push]

0 commit comments

Comments
 (0)