Add trailing newlines if present in diff #498
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install prettier | |
- name: Run reviewdog | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: > | |
reviewdog | |
--reporter=local | |
--runners=prettier | |
- uses: reviewdog/action-suggester@v1 | |
with: | |
tool_name: prettier | |
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" |