From fc5f8599b27018125f0c81dad332569aa13954ef Mon Sep 17 00:00:00 2001 From: Pedram Navid <1045990+PedramNavid@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:36:47 -0700 Subject: [PATCH] add github workflow for vale --- .github/workflows/vale.yml | 35 +++++++++++++++++++++++++++++++++++ docs/Makefile | 5 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/vale.yml diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml new file mode 100644 index 0000000000000..818a94f176050 --- /dev/null +++ b/.github/workflows/vale.yml @@ -0,0 +1,35 @@ +name: Vale 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 + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: '["docs/content", "docs/sphinx"]' + vale_flags: "--config=docs/.vale.ini" + fail_on_error: true + 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