Skip to content

Note that doc-validator does not check full URL links #452

Note that doc-validator does not check full URL links

Note that doc-validator does not check full URL links #452

name: Validate documentation
on:
pull_request:
paths: ["docs/sources/**", "vale/**"]
workflow_dispatch:
jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:v4.0.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:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run linter
run: >
/bin/reviewdog
--conf=/etc/vale/.reviewdog.yml
--fail-on-error
--filter-mode=diff_context
--reporter=github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
report-readability:
name: Report readability
runs-on: ubuntu-latest
steps:
- name: Checkout repo with history
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Rebilly/lexi@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
glob: "docs/sources/**/*.md"