diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98ed932ceca..4c2457d3c02 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -135,6 +135,8 @@ jobs: linkcheck-internal: needs: setup runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout Repo uses: actions/checkout@v6 @@ -159,9 +161,20 @@ jobs: echo "node_modules not found, installing dependencies..." npm ci --prefer-offline --no-audit fi + + - name: Build Site + run: npm run build - name: Check Internal Links - run: npm run linkcheck-internal + uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0 + with: + args: >- + --root-dir $GITHUB_WORKSPACE/.vercel/output/static + --config lychee.toml + '.vercel/output/static/**/*.html' + fail: true + format: markdown + jobSummary: true # Job 4: Check Types typecheck: diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 00000000000..e0ebbf2d985 --- /dev/null +++ b/lychee.toml @@ -0,0 +1,41 @@ +# Lychee Link Checker Configuration +# https://lychee.cli.rs/ + +# Only check local files (no network requests) +offline = true + +# Check links in code blocks +include_verbatim = true + +# Don't show progress bar (better for CI) +no_progress = true + +# Patterns to exclude from link checking +exclude = [ + # CSS files + 'assets/.*\.css$', + '_astro/.*\.css$', + + # Dynamic pages with query params + '/ccip/directory/.*', + '/data-feeds/price-feeds/addresses\?.*', + '/data-feeds/smartdata/addresses\?.*', + + # Other files + 'sitemap-index\.xml', + '@vite/client', + + # Database connection strings + 'postgresql:', + 'mysql:', +] + +# Paths to exclude from scanning (won't check links on these pages) +exclude_path = [ + 'ccip/api-reference/evm/v162/.*', + 'ccip/api-reference/evm/v163/.*', +] + +# TODO: Re-enable fragment checking once Astro slug generation compatibility is resolved +# include_fragments = true +# Astro's heading ID generation and lychee's GitHub-style kebab-case expectations \ No newline at end of file diff --git a/src/content/cre/getting-started/part-4-writing-onchain-go.mdx b/src/content/cre/getting-started/part-4-writing-onchain-go.mdx index 1a5be2c1733..89c29c128db 100644 --- a/src/content/cre/getting-started/part-4-writing-onchain-go.mdx +++ b/src/content/cre/getting-started/part-4-writing-onchain-go.mdx @@ -183,7 +183,7 @@ go mod tidy