-
Notifications
You must be signed in to change notification settings - Fork 103
105 lines (97 loc) · 3.27 KB
/
documentation-checks.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Automatic documentation checks
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_call:
inputs:
python-version:
description: 'Version of the Python interpreter to use (defaults to 3.10)'
required: false
type: string
default: '3.10'
woke-target:
description: 'Target to run for the inclusive language check (default: "woke")'
required: false
type: string
default: 'woke'
linkcheck-target:
description: 'Target to run for the link check (default: "linkcheck")'
required: false
type: string
default: 'linkcheck'
pa11y-target:
description: 'Target to run for the accessibility check (default: "pa11y")'
required: false
type: string
default: 'pa11y'
outputs:
spellcheck-result:
description: "Result of the spelling check"
value: ${{ jobs.docchecks.outputs.result_spelling }}
woke-result:
description: "Result of the inclusive language check"
value: ${{ jobs.docchecks.outputs.result_woke }}
linkcheck-result:
description: "Result of the link check"
value: ${{ jobs.docchecks.outputs.result_links }}
pa11y-result:
description: "Result of the pa11y check"
value: ${{ jobs.docchecks.outputs.result_pa11y }}
jobs:
docchecks:
name: Run documentation checks
runs-on: ubuntu-22.04
outputs:
result_spelling: ${{ steps.spellcheck-step.outcome }}
result_woke: ${{ steps.woke-step.outcome }}
result_links: ${{ steps.linkcheck-step.outcome }}
result_pa11y: ${{ steps.pa11y-step.outcome }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Spell Check
id: spellcheck-step
if: success() || failure()
uses: canonical/documentation-workflows/spellcheck@main
with:
working-directory: doc/sphinx
install-target: install
spelling-target: spelling
makefile: Makefile
- name: Inclusive Language Check
id: woke-step
if: success() || failure()
uses: canonical/documentation-workflows/inclusive-language@main
with:
working-directory: doc/sphinx
install-target: install
woke-target: woke
makefile: Makefile
- name: Accessibility Check
id: pa11y-step
continue-on-error: true
if: success() || failure()
uses: canonical/documentation-workflows/pa11y@main
with:
working-directory: doc/sphinx
install-target: install
pa11y-target: pa11y
makefile: Makefile
- name: Link Check
id: linkcheck-step
if: success() || failure()
uses: canonical/documentation-workflows/linkcheck@main
with:
working-directory: doc/sphinx
install-target: install
linkcheck-target: linkcheck
makefile: Makefile
- if: ${{ failure() && runner.debug }}
name: Setup upterm session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true