Skip to content

Commit 989a138

Browse files
authored
chore: add links check
1 parent 40cdc16 commit 989a138

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/links-check.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 🔗 检查链接
2+
3+
on:
4+
repository_dispatch:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
schedule:
10+
- cron: "00 18 * * 6"
11+
12+
jobs:
13+
linkChecker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Link Checker
19+
id: lychee
20+
uses: lycheeverse/[email protected]
21+
env:
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
with:
24+
# Check all markdown and html files in repo (default)
25+
args: --verbose --no-progress --max-redirects 3 ./**/*.md'
26+
format: markdown
27+
workingDirectory: docs/
28+
29+
- name: Create Issue From File
30+
if: env.lychee_exit_code != 0
31+
uses: peter-evans/create-issue-from-file@v4
32+
with:
33+
title: 🔗 链接检查报告
34+
content-filepath: ./lychee/out.md
35+
labels: report, automated issue

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## AI比赛经验帖子 & 训练和测试技巧帖子集锦
22

3+
[![Check Links](https://github.com/SWHL/AI-Competition-Collections/actions/workflows/links.yml/badge.svg)](https://github.com/SWHL/AI-Competition-Collections/actions/workflows/links.yml)
4+
35
> 从他人比赛经验中,总是可以学到很多东西
46
57
欢迎您贡献看到的AI比赛经验帖子,可以通过点击[🌈贡献AI比赛经验帖子](https://www.wjx.cn/vm/PRivSRh.aspx#),或扫码填写。(当然直接提PR更欢迎)

0 commit comments

Comments
 (0)