From b5709f7d18d2e2ac883f4223777edeee9cc22b85 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 7 Jul 2023 11:32:58 -0500 Subject: [PATCH] update linkcheck (#9193) --- .github/workflows/linkcheck.yml | 6 ++++-- docs/conf.py | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 56731d755..eb2376378 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -1,6 +1,9 @@ name: linkcheck on: - pull_request: {} + pull_request: + paths: + - docs/conf.py + - .github/workflows/linkcheck.yml push: branches: - main @@ -13,7 +16,6 @@ env: jobs: docs-linkcheck: - if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.title, 'linkcheck')) runs-on: ubuntu-latest name: "linkcheck" timeout-minutes: 10 diff --git a/docs/conf.py b/docs/conf.py index 4cbbde37b..1ee7eabf1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -202,6 +202,9 @@ linkcheck_ignore = [ r"https://www.oscca.gov.cn", # Cloudflare returns 403s for all non-browser requests r"https://speakerdeck.com", + # GitHub changed how they do page renders so anchor detection + # no longer works in source view + r"https://github.com/.*/blob/.*#L\d+", ] autosectionlabel_prefix_document = True