-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
我正在维护一个基于 Fumadocs (Next.js) 的文档项目。请帮我配置一个 GitHub Action 自动化工作流,使用 "lychee-action" 来检测项目中的死链接。
具体要求如下:
- 工作流文件:在
.github/workflows/目录下创建一个名为check-links.yml的文件。 - 触发条件:当代码 push 到 main 分支,或者有 Pull Request 提交时触发。
- 扫描范围:扫描
content目录下的所有.md和.mdx文件(这是 Fumadocs 存放文档的地方),以及根目录的README.md。 - 忽略规则:创建一个
.lycheeignore文件,默认忽略以下链接(防止误报):- 所有的
http://localhost*(本地开发链接) https://example.com(示例链接)https://twitter.com*或https://x.com*(防止社交媒体反爬虫报错)
- 所有的
- 执行策略:如果发现死链,CI 必须报错(Fail),阻止代码合并。
Metadata
Metadata
Assignees
Labels
No labels