From 6adde61a7238682a3a1ae25a5e8b7ad223ade7d2 Mon Sep 17 00:00:00 2001 From: Marcos Boger Date: Wed, 27 Aug 2025 18:59:46 -0300 Subject: [PATCH 1/5] Initial version of doc-check-links workflow --- .github/workflows/doc-check-links.yml | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/doc-check-links.yml diff --git a/.github/workflows/doc-check-links.yml b/.github/workflows/doc-check-links.yml new file mode 100644 index 00000000000..d7dc946fff1 --- /dev/null +++ b/.github/workflows/doc-check-links.yml @@ -0,0 +1,37 @@ +name: Doc Check Links + +on: + schedule: + # At 00:00 on Sunday. + # https://crontab.guru + - cron: '0 0 * * 0' + workflow_dispatch: + +# Set permissions at the job level. +permissions: {} + +jobs: + doc-check-links: + # if: github.repository_owner == 'pytest-dev' + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Run Doc Check Links via tox + run: tox -e docs-checklinks From fc3c818e3a4558f73cdf73e18c691339a94de0fd Mon Sep 17 00:00:00 2001 From: Marcos Boger Date: Wed, 27 Aug 2025 19:15:01 -0300 Subject: [PATCH 2/5] Small format adjustments. Uncomment line to only run in original repo --- .github/workflows/doc-check-links.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doc-check-links.yml b/.github/workflows/doc-check-links.yml index d7dc946fff1..9dccde15aa3 100644 --- a/.github/workflows/doc-check-links.yml +++ b/.github/workflows/doc-check-links.yml @@ -7,12 +7,12 @@ on: - cron: '0 0 * * 0' workflow_dispatch: -# Set permissions at the job level. +# Set permissions at the job level, if needed. permissions: {} jobs: doc-check-links: - # if: github.repository_owner == 'pytest-dev' + if: github.repository_owner == 'pytest-dev' runs-on: ubuntu-latest steps: @@ -33,5 +33,5 @@ jobs: python -m pip install --upgrade pip pip install tox - - name: Run Doc Check Links via tox + - name: Run sphinx linkcheck via tox run: tox -e docs-checklinks From a63dcf59a6eb290e1e8d57b3943f2809248acef6 Mon Sep 17 00:00:00 2001 From: Marcos Boger Date: Wed, 27 Aug 2025 19:17:44 -0300 Subject: [PATCH 3/5] Add Marcos Boger to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index d09c4dc98b4..f93de06c10d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -282,6 +282,7 @@ Marcin Augustynów Marcin Bachry Marc Bresson Marco Gorelli +Marcos Boger Mark Abramowitz Mark Dickinson Mark Vong From b690bc2597a01da5633564ff2073bea692ec52b4 Mon Sep 17 00:00:00 2001 From: Marcos Boger Date: Wed, 27 Aug 2025 19:21:18 -0300 Subject: [PATCH 4/5] Add changelog for 12474 --- changelog/12474.contrib.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/12474.contrib.rst diff --git a/changelog/12474.contrib.rst b/changelog/12474.contrib.rst new file mode 100644 index 00000000000..bb668fd66c5 --- /dev/null +++ b/changelog/12474.contrib.rst @@ -0,0 +1 @@ +Added scheduled GitHub Action Workflow to run Sphinx linkchecks in repo documentation. From 10df6a62be02172c95af9affc394249cb2479832 Mon Sep 17 00:00:00 2001 From: Marcos Boger Date: Wed, 27 Aug 2025 19:22:43 -0300 Subject: [PATCH 5/5] Remove unneded comment --- .github/workflows/doc-check-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc-check-links.yml b/.github/workflows/doc-check-links.yml index 9dccde15aa3..fd324618d08 100644 --- a/.github/workflows/doc-check-links.yml +++ b/.github/workflows/doc-check-links.yml @@ -7,7 +7,7 @@ on: - cron: '0 0 * * 0' workflow_dispatch: -# Set permissions at the job level, if needed. +# Set permissions at the job level. permissions: {} jobs: