forked from grafana/writers-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.84 KB
/
validate-documentation.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
name: Validate documentation
on:
pull_request:
paths: ["docs/sources/**"]
workflow_dispatch:
jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:v3.2.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
- name: "Run doc-validator tool"
run: >
doc-validator
'--skip-checks=^image.+$'
docs/sources
/docs/writers-toolkit
| reviewdog
-f=rdjsonl
--fail-on-error
--filter-mode=nofilter
--name=doc-validator
--reporter=github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
prettier:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "EPMatt/reviewdog-action-prettier@v1"
with:
fail_on_error: true
filter_mode: "nofilter"
github_token: "${{ secrets.github_token }}"
level: "info"
reporter: "github-pr-review"
test:
runs-on: "ubuntu-latest"
steps:
- name: "Check out code"
uses: "actions/checkout@v3"
- name: "Build website"
run: |
docker run -v ${PWD}/docs/sources:/hugo/content/docs/writers-toolkit -e HUGO_REFLINKSERRORLEVEL=ERROR --rm grafana/docs-base:latest /bin/bash -c 'make hugo'
vale:
runs-on: "ubuntu-latest"
container:
image: "grafana/vale:jdb-2023-07-vale"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
- name: "Run linter"
run: "/bin/vale --minAlertLevel=error --config=vale/.vale.ini --output=/etc/vale/rdjsonl.tmpl ./docs/sources | /bin/reviewdog --fail-on-error --filter-mode=nofilter --f=rdjsonl --name=vale --reporter=github-pr-review"
env:
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"