Skip to content

Commit 192084e

Browse files
committed
add CI workflow
1 parent ef880d1 commit 192084e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/vale.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Vale
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**/*.mdx"
7+
- ".vale.ini"
8+
- ".vale/**"
9+
push:
10+
branches: [main]
11+
paths:
12+
- "**/*.mdx"
13+
- ".vale.ini"
14+
- ".vale/**"
15+
16+
jobs:
17+
vale:
18+
name: Vale linting
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
# Fetch full history for better diff detection
24+
fetch-depth: 0
25+
26+
- name: Get changed files
27+
id: changed-files
28+
uses: tj-actions/changed-files@v44
29+
with:
30+
files: |
31+
**/*.mdx
32+
files_ignore: |
33+
.vale/**
34+
README.md
35+
36+
- name: Vale (changed files only)
37+
if: steps.changed-files.outputs.any_changed == 'true'
38+
uses: errata-ai/vale-action@reviewdog
39+
with:
40+
files: ${{ steps.changed-files.outputs.all_changed_files }}
41+
vale_flags: "--config=.vale.ini"
42+
fail_on_error: false
43+
reporter: github-pr-review
44+
env:
45+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
46+
47+
- name: Vale (full check on config changes)
48+
if: steps.changed-files.outputs.any_changed == 'false'
49+
uses: errata-ai/vale-action@reviewdog
50+
with:
51+
files: '.'
52+
vale_flags: "--config=.vale.ini"
53+
fail_on_error: false
54+
reporter: github-pr-review
55+
env:
56+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)