docs: update redirecting documentation links #697
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Link Checker | |
| on: [push, pull_request] | |
| jobs: | |
| linkchecker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6 | |
| # Blocking: fail the build only on genuinely broken links (4xx/5xx, | |
| # DNS failures, timeouts). Redirects are accepted here so a moved link | |
| # does not break CI on its own -- the pass below surfaces those. | |
| - name: Check for broken links | |
| id: lychee-broken | |
| uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 | |
| with: | |
| args: --accept=200,206,301,302,307,308,403,429 --max-retries=3 --retry-wait-time=10 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://opensearch-domain.region.com/" --exclude "https://github.com/\[your*" --exclude "https://localhost:9200" --exclude "https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg" | |
| fail: true | |
| jobSummary: true | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| # Non-blocking: surface permanent redirects (301/308) so their links can | |
| # be updated to point at the final destination. --max-redirects=0 makes | |
| # lychee report the redirect status instead of following it; 302/307 stay | |
| # accepted because temporary redirects are not a signal to rewrite a link. | |
| # fail:false + if:always() so this always reports without breaking CI. | |
| - name: Report permanently-redirecting links (non-blocking) | |
| id: lychee-redirects | |
| if: always() | |
| uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 | |
| with: | |
| args: --accept=200,206,302,307,403,429 --max-redirects=0 --max-retries=3 --retry-wait-time=10 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://opensearch-domain.region.com/" --exclude "https://github.com/\[your*" --exclude "https://localhost:9200" --exclude "https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg" | |
| fail: false | |
| jobSummary: true | |
| env: | |
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |