Skip to content

Commit

Permalink
add github workflow for vale
Browse files Browse the repository at this point in the history
  • Loading branch information
PedramNavid committed Aug 8, 2024
1 parent cc08b37 commit fc5f859
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -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

5 changes: 4 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
@@ -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}'
Expand Down Expand Up @@ -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

0 comments on commit fc5f859

Please sign in to comment.