name: links when pr on: pull_request: branches: [ master ] paths: - '**.md' - '.lycheeignore' jobs: linkChecker: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20.13.1' - name: install doc dependencies run: sudo npm i - name: Link Checker uses: lycheeverse/lychee-action@v1.8.0 with: fail: true # For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters # -E, --exclude-all-private Exclude all private IPs from checking. # -i, --insecure Proceed for server connections considered insecure (invalid TLS) # -n, --no-progress Do not show progress bar. # -t, --timeout Website timeout in seconds from connect to response finished [default:20] # --max-concurrency Maximum number of concurrent network requests [default: 128] # -a --accept Comma-separated list of accepted status codes for valid links # --max-retries Maximum number of retries per request # -r, --retry-wait-time Minimum wait time in seconds between retries of failed requests # -u, --user-agent User agent # *.md all markdown files in the root directory args: -E -i -n -t 45 -r 3 --max-retries 5 --max-concurrency 64 -a 401,403 -u "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" -v --exclude-path "node_modules" --exclude-path "dist" --exclude-path "cache" -- '**/*.md' env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}