diff --git a/.github/workflows/lychee.yaml b/.github/workflows/lychee.yaml new file mode 100644 index 0000000000..d722033a91 --- /dev/null +++ b/.github/workflows/lychee.yaml @@ -0,0 +1,42 @@ +name: Link Checker + +on: + schedule: + # Run every Monday at 9:00 AM UTC + - cron: '0 9 * * 1' + workflow_dispatch: + +permissions: + issues: write + contents: read + +env: + # Use GITHUB_TOKEN to avoid rate limiting + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + link-checker: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout sources + uses: actions/checkout@v5 + with: + submodules: true + + - name: Check links and create issues + uses: lycheeverse/lychee-action@v2 + with: + args: --config ./lychee.toml --cache-exclude-status 429 '**/README.md' './docs/**/*.md' './docs/**/*.mdx' './docs/**/*.html' './docs/**/*.json' + fail: false + issue-on-error: true + issue-title: "Link Checker found broken links" + issue-body: | + The automated link checker found broken links in the repository. + + Please review and fix the broken links listed below: + + $LYCHEE_REPORT + + # Avoid duplicate issues by closing previous ones + close-previous-issues: true \ No newline at end of file diff --git a/.github/workflows/rust_ci.yaml b/.github/workflows/rust_ci.yaml index 52ce721cfd..40d5afd95a 100644 --- a/.github/workflows/rust_ci.yaml +++ b/.github/workflows/rust_ci.yaml @@ -253,14 +253,4 @@ jobs: run: | zepter - lychee: - runs-on: ubuntu-latest - env: - # Use GITHUB_TOKEN to avoid rate limiting - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - timeout-minutes: 30 - steps: - - uses: actions/checkout@v5 - - uses: lycheeverse/lychee-action@v2 - with: - args: --config ./lychee.toml --cache-exclude-status 429 '**/README.md' './docs/**/*.md' './docs/**/*.mdx' './docs/**/*.html' './docs/**/*.com' +