forked from napari/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 2.29 KB
/
linkcheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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@v4
- name: Clone docs repo
uses: actions/checkout@v4
with:
# place in '/home/runner/work/docs/docs/docs'
path: docs # place in a named directory
- name: Clone main repo
uses: actions/checkout@v4
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@v5
with:
python-version: "3.10"
cache-dependency-path: |
napari/pyproject.toml
docs/requirements.txt
- uses: tlambert03/setup-qt-libs@v1
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "napari/[all]"
env:
PIP_CONSTRAINT: ${{ github.workspace }}/napari/resources/constraints/constraints_py3.10_docs.txt
- name: Run link checker
uses: aganders3/headless-gui@v2
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: |
python -m pip install -r docs/requirements.txt
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@v4
with:
title: Link Checker Report
content-filepath: ./docs/docs/_build/html/output.txt
labels: maintenance, task