Skip to content

External links checker #470

External links checker

External links checker #470

Workflow file for this run

name: External links checker
on:
repository_dispatch:
workflow_dispatch: # can also be triggered manually
schedule:
- cron: "0 0 * * *" # every sunday at midnight
jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Clone docs repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# place in '/home/runner/work/docs/docs/docs'
path: docs # place in a named directory
- name: Clone main repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# place in '/home/runner/work/docs/docs/napari'
path: napari # place in a named directory
repository: napari/napari
# ensure version metadata is proper
fetch-depth: 0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
cache-dependency-path: |
napari/pyproject.toml
docs/requirements.txt
- uses: tlambert03/setup-qt-libs@19e4ef2d781d81f5f067182e228b54ec90d23b76 # v1.8
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "napari/[pyqt5, docs]"
env:
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
- name: Run link checker
uses: aganders3/headless-gui@f85dd6316993505dfc5f21839d520ae440c84816 # v2.2
env:
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
with:
# Runs in '/home/runner/work/docs/docs/docs'
# Built HTML pages in '/home/runner/work/docs/docs/docs/docs/_build/html'
run: |
make -C docs linkcheck-files
# skipping setup stops the action from running the default (tiling) window manager
# the window manager is not necessary for docs builds at this time and it was causing
# problems with screenshots (https://github.com/napari/docs/issues/285)
linux-setup: "echo 'skip setup'"
linux-teardown: "echo 'skip teardown'"
- name: Create issue from file
if: ${{ failure() }}
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Link Checker Report
content-filepath: ./docs/docs/_build/html/output.txt
labels: maintenance, task