File tree Expand file tree Collapse file tree 2 files changed +52
-4
lines changed
Expand file tree Collapse file tree 2 files changed +52
-4
lines changed Original file line number Diff line number Diff line change 44 pull_request :
55 branches : [ main ]
66 paths :
7- # - '**.md'
7+ - ' **.md'
88 - ' .lycheeignore'
99
1010jobs :
2121 - name : Build
2222 run : hugo --minify
2323
24- - name : Build MkDocs
25- run : mkdocs build
26-
2724 - name : Link Checker
2825 uses : lycheeverse/lychee-action@v1.5.0
2926 with :
Original file line number Diff line number Diff line change 1+ name : links
2+
3+ on :
4+ repository_dispatch :
5+ workflow_dispatch :
6+ schedule :
7+ - cron : " 30 8 * * *"
8+
9+ jobs :
10+ linkChecker :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Download Exclude Path
16+ run : |
17+ curl https://raw.githubusercontent.com/gocn/How-To-Code-in-Go/main/.lycheeignore --output .lycheeignore
18+
19+ - name : Setup Hugo
20+ uses : peaceiris/actions-hugo@v2
21+ with :
22+ hugo-version : " latest"
23+
24+ - name : Build
25+ run : hugo --minify
26+
27+ - name : Check Links
28+ uses : lycheeverse/lychee-action@v1.5.0
29+ with :
30+ # For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
31+ # -E, --exclude-all-private Exclude all private IPs from checking.
32+ # -v, --verbose Verbose program output
33+ # -i, --insecure Proceed for server connections considered insecure (invalid TLS)
34+ # -n, --no-progress Do not show progress bar.
35+ # -t, --timeout <timeout> Website timeout in seconds from connect to response finished [default:20]
36+ # --max-concurrency <max-concurrency> Maximum number of concurrent network requests [default: 128]
37+ # -a --accept <accept> Comma-separated list of accepted status codes for valid links
38+
39+ # ./site the MkDocs site directory to check
40+ # ./*.md all markdown files in the root directory
41+ args : -E -v -i -n -t 45 --max-concurrency 64 -a 429,401 -- 'public' '*.md'
42+ output : out.md
43+ env :
44+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
45+
46+ - name : Create Issue From File
47+ uses : peter-evans/create-issue-from-file@v3
48+ with :
49+ title : Broken Link Detected
50+ content-filepath : out.md
51+ # assignees: aFlyBird0
You can’t perform that action at this time.
0 commit comments