diff --git a/.github/workflows/ci-developer-hub-links.yml b/.github/workflows/ci-developer-hub-links.yml new file mode 100644 index 0000000000..6921603156 --- /dev/null +++ b/.github/workflows/ci-developer-hub-links.yml @@ -0,0 +1,35 @@ +name: Check developer-hub links + +on: + pull_request: + paths: + - "apps/developer-hub/content/**" + - "apps/developer-hub/src/**" + - .github/workflows/ci-developer-hub-links.yml + - .lycheeignore + push: + branches: [main] + paths: + - "apps/developer-hub/content/**" + - "apps/developer-hub/src/**" + +concurrency: + group: links-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + check-links: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check links + uses: lycheeverse/lychee-action@v2 + with: + args: >- + --base https://docs.pyth.network + --no-progress + --exclude-path apps/developer-hub/node_modules + 'apps/developer-hub/content/**/*.mdx' + 'apps/developer-hub/content/**/*.md' + fail: true diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 0000000000..f7ad076700 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,10 @@ +# Placeholder / example URLs in code snippets +YOUR_ +REPLACE_ +example\.com + +# Blockchain explorer links with placeholder addresses +0xYOUR + +# RPC / API endpoints that require auth or may rate-limit +https://hermes\.pyth\.network/docs/openapi\.json