Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link checker #5098

Merged
merged 9 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/.config/lychee.toml → .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@

verbose = "debug"
no_progress = true
# Requires CAPTCHA verification
exclude = ["https://faucet.calibnet.chainsafe-fil.io/funds.html"]
timeout = 60
exclude_path = [
"./node_modules",
"./docs/node_modules",
"./documentation",
"./target"
]
exclude = [
# Avoid Github rate limits
"github.com/ChainSafe/forest",
# Requires CAPTCHA verification
"faucet.calibnet.chainsafe-fil.io/funds.html"
]
timeout = 30
max_retries = 6
retry_wait_time = 10

output = "lychee-report.md"
36 changes: 0 additions & 36 deletions .github/workflows/docs.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Link Checker

on:
workflow_dispatch:
schedule:
# Run daily at 9am
- cron: "00 9 * * *"
push:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.html"
- ".github/workflows/link-check.yml"
merge_group:
pull_request:
branches:
- main
paths:
- "**.md"
- "**.mdx"
- "**.html"
- ".github/workflows/link-check.yml"

jobs:
link-check:
name: Link Check
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --config ./.config/lychee.toml './**/*.md' './**/*.mdx' './**/*.html'

- name: Create Issue From File
if: env.lychee_exit_code != 0 && github.event_name == 'schedule'
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./lychee-report.md

- name: Fail job on error
if: env.lychee_exit_code != 0 && github.event_name != 'schedule'
run: exit 1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,5 @@ rust-project.json
# .pnp.*

# End of https://www.toptal.com/developers/gitignore/api/go,rust,rust-analyzer,osx,visualstudiocode,intellij+all,yarn,node,ruby

lychee-report.md
2 changes: 0 additions & 2 deletions .lycheeignore

This file was deleted.

10 changes: 0 additions & 10 deletions lychee.toml

This file was deleted.

Loading