From 7ec3682b46c267ed17524458ba90138d960f86d9 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Wed, 20 May 2026 09:34:52 -0700 Subject: [PATCH] docs-ci: add input `run-linkcheck` Allow calling workflows to skip linkcheck steps. This will allow our workflows to stop linkcheck on every run to reduce the noise from false positives. Defaults to true to keep the previous behavior. --- .github/workflows/ci.yaml | 2 ++ .github/workflows/docs-ci.yaml | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6568f41..ffdb12a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,6 +36,7 @@ jobs: repo: nextstrain/docs.nextstrain.org docs-directory: . environment-file: conda.yml + run-linkcheck: false test-docs-ci-pip: uses: ./.github/workflows/docs-ci.yaml @@ -43,6 +44,7 @@ jobs: repo: nextstrain/augur docs-directory: docs/ pip-install-target: .[dev] + run-linkcheck: false test-pathogen-repo-build: permissions: diff --git a/.github/workflows/docs-ci.yaml b/.github/workflows/docs-ci.yaml index fbc7dfa..bec120e 100644 --- a/.github/workflows/docs-ci.yaml +++ b/.github/workflows/docs-ci.yaml @@ -39,6 +39,13 @@ on: type: string default: html + run-linkcheck: + description: >- + Run linkcheck steps + type: boolean + default: true + required: false + env: # Used for `make` steps. # -n: warn on missing references @@ -88,10 +95,12 @@ jobs: working-directory: ${{ inputs.docs-directory }} # Ignore the exit code, results will be checked in the next step - - run: make linkcheck || true + - if: inputs.run-linkcheck + run: make linkcheck || true working-directory: ${{ inputs.docs-directory }} - - name: Check for broken links + - if: inputs.run-linkcheck + name: Check for broken links run: | broken_links=$(jq 'select(.status == "broken")' "$BUILDDIR/linkcheck/output.json") if [ -n "$broken_links" ]; then