Files
json/.github/workflows/check_docs_links.yml
T
dependabot[bot] 3a62c078ee Bump step-security/harden-runner from 2.22.1 to 2.22.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.22.1 to 2.22.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/ccd8616d44fd3846e67624a50d5aad6d37bf2d25...dc2769abcc0fcfbadfc1df54081c1608579ef6b2)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-29 15:48:05 +00:00

47 lines
1.2 KiB
YAML

name: Check documentation links
# check the links of the documentation weekly; external links break without any change in this repository
on:
schedule:
- cron: '17 4 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
check_docs_links:
if: github.repository == 'nlohmann/json'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Harden Runner
uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install virtual environment
run: make install_venv -C docs/mkdocs
- name: Check links
shell: bash # adds -o pipefail, so tee does not hide the exit code
run: make link_check -C docs/mkdocs 2>&1 | tee link_check.log
- name: Summarize broken links
if: failure()
run: |
{
echo '### Broken documentation links'
echo '```'
grep 'invalid url' link_check.log || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"