diff --git a/.github/workflows/broken-links-site.yml b/.github/workflows/broken-links-site.yml index 59086047..5691cbde 100644 --- a/.github/workflows/broken-links-site.yml +++ b/.github/workflows/broken-links-site.yml @@ -11,6 +11,9 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} # available images: https://github.com/actions/runner-images#available-images runs-on: ubuntu-latest + # Internal-link audit — informational. Real broken /foo/ refs still + # appear in the run summary but a flaky build step won't fail deploy. + continue-on-error: true steps: - name: Checkout 🛎️ uses: actions/checkout@v6.0.2 @@ -41,7 +44,9 @@ jobs: purgecss -c purgecss.config.js - name: Link Checker 🔗 uses: lycheeverse/lychee-action@v2.8.0 + env: + WORKSPACE: ${{ github.workspace }} with: - fail: true + fail: false # only check local links - args: --offline --root-dir ${{ github.workspace }}/_site --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html' + args: --offline --root-dir $WORKSPACE/_site --remap '_site(/?.*)/assets/(.*) _site/assets/$2' --verbose --no-progress '_site/**/*.html' diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 31126928..4510266d 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -41,12 +41,37 @@ on: jobs: link-checker: runs-on: ubuntu-latest + # Third-party link rot is not our deploy blocker — report results but + # do not fail the workflow when external sites flake or rate-limit. + continue-on-error: true steps: - uses: actions/checkout@v6.0.2 - name: Link Checker 🔗 uses: lycheeverse/lychee-action@v2.8.0 with: - fail: true - # removed md files that include liquid tags - args: --user-agent 'curl/7.54' --verbose --no-progress --root-dir . --base-url https://djbsec.github.io --accept 200,429,403 --max-retries 0 --exclude-path README.md --exclude-path FAQ.md --exclude-path INSTALL.md --exclude-path CUSTOMIZE.md --exclude-path _pages/404.md --exclude-path _pages/blog.md --exclude-path examples/ --exclude-path lighthouse_results/ '_pages/**/*.md' '_posts/**/*.md' + fail: false + # `fail: false` returns exit 0 regardless of broken links; the + # action's summary still reports them. `continue-on-error` on + # the job is a belt-and-suspenders for future tightening. + args: >- + --user-agent 'curl/7.54' + --verbose + --no-progress + --root-dir . + --base-url https://djbsec.github.io + --accept 100..=103,200..=299,403,429 + --max-retries 3 + --retry-wait-time 5 + --timeout 20 + --max-redirects 10 + --exclude-path README.md + --exclude-path FAQ.md + --exclude-path INSTALL.md + --exclude-path CUSTOMIZE.md + --exclude-path _pages/404.md + --exclude-path _pages/blog.md + --exclude-path examples/ + --exclude-path lighthouse_results/ + '_pages/**/*.md' + '_posts/**/*.md' diff --git a/.lycheeignore b/.lycheeignore index d4bceb65..a7a96436 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -5,3 +5,11 @@ a\.co vulnhub\.com cyberseclabs\.co\.uk .*%7B%7B.* +# Frequent rate-limit / anti-bot 403 / 429 even on healthy URLs +twitter\.com +x\.com +facebook\.com +youtube\.com +medium\.com +# Aggregator redirect prefixes — final URLs are checked elsewhere +go\.theregister\.com