Skip to content

External links checker #666

External links checker

External links checker #666

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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Clone docs repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# place in '/home/runner/work/docs/docs/docs'
path: docs # place in a named directory
- name: Clone main repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
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.12_docs.txt
- name: Run link checker
uses: aganders3/headless-gui@f85dd6316993505dfc5f21839d520ae440c84816 # v2.2
env:
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.12_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