Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Links Checker using Lychee #1757

Closed
wants to merge 11 commits into from
42 changes: 30 additions & 12 deletions .github/workflows/external-links.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
name: Check external links

on:
schedule:
- cron: '59 23 * * */7'
workflow_dispatch:
schedule:
- cron: "59 23 * * 0"
push:
branches:
- "external-links-checker-lychee"

jobs:
check-external-links:
name: Check external links
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- name: Checkout Repo
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Install Dependencies
run: npm i
- name: Run external link checks
run: npm run linkcheck-external
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Link Checker
uses: lycheeverse/lychee-action@v1.9.0
with:
args: >
--base ./dist
--quiet
--no-progress
'./dist/**/*.html'
--exclude '(^(file://)|http://127.0.0.1:\d+|https://127.0.0.1:\d+|http://localhost:\d+|https://localhost:\d+|https?://[^ ]*/%s)'
--format markdown
--user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
--github-token ${{ secrets.GITHUB_TOKEN }}
format: markdown
fail: true
13 changes: 13 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 406 errors
https://chain.link/*
https://blog.chain.link/*

# 429 errors
https://api.coingecko.com/api/v3/*

# Others
https://www.googletagmanager.com/gtm.js?id=
https://01.functions-gateway.chain.link/
https://02.functions-gateway.testnet.chain.link/
https://02.functions-gateway.chain.link/
https://01.functions-gateway.testnet.chain.link/
Loading