From d3e4ff2cfc2038dba36ef663ec9e0829d916f89f Mon Sep 17 00:00:00 2001 From: Smetalo <92152119+Smetalo@users.noreply.github.com> Date: Thu, 23 Oct 2025 17:50:41 +0200 Subject: [PATCH] feat: Add lychee-action to check for broken links (#11781) Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 13 +++++++++++++ .github/workflows/links.yml | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/links.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09d0be0929..493232c586 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,17 @@ jobs: - name: 'Run sensitive keyword linter' run: 'node scripts/lint.js --sensitive-keywords' + link_checker: + name: 'Link Checker' + runs-on: 'ubuntu-latest' + steps: + - name: 'Checkout' + uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + - name: 'Link Checker' + uses: 'lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2' # ratchet: lycheeverse/lychee-action@v2.6.1 + with: + args: '--verbose ./**/*.md' + fail: true test_linux: name: 'Test (Linux)' runs-on: 'gemini-cli-ubuntu-16-core' @@ -354,6 +365,7 @@ jobs: if: 'always()' needs: - 'lint' + - 'link_checker' - 'test_linux' - 'test_mac' - 'codeql' @@ -363,6 +375,7 @@ jobs: - name: 'Check all job results' run: | if [[ (${{ needs.lint.result }} != 'success' && ${{ needs.lint.result }} != 'skipped') || \ + (${{ needs.link_checker.result }} != 'success' && ${{ needs.link_checker.result }} != 'skipped') || \ (${{ needs.test_linux.result }} != 'success' && ${{ needs.test_linux.result }} != 'skipped') || \ (${{ needs.test_mac.result }} != 'success' && ${{ needs.test_mac.result }} != 'skipped') || \ (${{ needs.codeql.result }} != 'success' && ${{ needs.codeql.result }} != 'skipped') || \ diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000000..b482a059c0 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,23 @@ +name: 'Links' + +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + repository_dispatch: + workflow_dispatch: + schedule: + - cron: '00 18 * * *' + +jobs: + linkChecker: + runs-on: 'ubuntu-latest' + steps: + - uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5 + + - name: 'Link Checker' + id: 'lychee' + uses: 'lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2' # ratchet: lycheeverse/lychee-action@v2.6.1 + with: + args: '--verbose --no-progress ./**/*.md'