Skip to content

Fix rendering of example admonitions #532

Fix rendering of example admonitions

Fix rendering of example admonitions #532

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:
- uses: actions/checkout@v4
- 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@v4
- run: >
curl
--location
--output reviewdog.tar.gz
https://github.com/jdbaldry/reviewdog/releases/download/v0.18.0-rc.1/reviewdog_0.18.0-rc.1_Linux_x86_64.tar.gz
- run: |
tar zxf reviewdog.tar.gz reviewdog
sudo cp reviewdog /usr/local/bin/
rm -f reviewdog.tar.gz
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install prettier
- run: >
reviewdog
--filter-mode=nofilter
--runners prettier
--tee
- run: >
git diff
| reviewdog
--f diff
--fail-on-error
--filter-mode nofilter
--reporter=github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
--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"