diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml new file mode 100644 index 0000000000000..cb21858b3080f --- /dev/null +++ b/.github/workflows/vale.yml @@ -0,0 +1,32 @@ +name: Docs +on: + pull_request: + paths: + - 'docs/**' + - .github/workflows/vale.yml + push: + branches: + - master + - docs-prod + paths: + - 'docs/**' + - .github/workflows/vale.yml + +concurrency: + group: ${{ github.workflow}}-${{github.ref}} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + vale: + name: runner / vale + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: errata-ai/vale-action@reviewdog + with: + files: '["docs/content", "docs/sphinx"]' + vale_flags: "--config=docs/.vale.ini" + diff --git a/docs/Makefile b/docs/Makefile index df4e362ade6bb..872b3358e7adb 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,4 +1,4 @@ -.PHONY: help +.PHONY: help vale help: @egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-30s\033[0m %s\n", $$1, $$2}' @@ -27,3 +27,6 @@ mdx-format: ## Format mdx files cd next; yarn mdx-format mdx-full-format: docs_ruff mdx-format + +vale: + vale content sphinx