Skip to content

Commit fcec969

Browse files
Raison MathewRaison Mathew
authored andcommitted
Changes
1 parent 9447b00 commit fcec969

File tree

3 files changed

+18
-34
lines changed

3 files changed

+18
-34
lines changed

.github/workflows/vale.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,31 @@
11
# .github/workflows/vale.yml
2-
name: Check AsciiDoc with Vale
2+
name: Check AsciiDoc with vale
33

4-
# This action runs on every push and pull request to the main branch.
5-
# You can customize this to fit your branching strategy.
64
on:
75
push:
8-
branches:
9-
- main
6+
paths:
7+
- 'posts/**/*.adoc'
108
pull_request:
11-
branches:
12-
- main
13-
9+
paths:
10+
- 'posts/**/*.adoc'
1411
jobs:
15-
prose:
16-
name: Runner
17-
runs-on: ubuntu-latest # Use the latest Ubuntu runner
18-
12+
vale:
13+
name: Vale Lint Check
14+
runs-on: ubuntu-latest
1915
steps:
20-
# Step 1: Check out the repository's code so the action can access it.
21-
- name: Check out repository
22-
uses: actions/checkout@v4
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
2318

24-
# Step 2: Set up Ruby and install Asciidoctor.
25-
# Vale can use Asciidoctor to accurately parse .adoc files.
2619
- name: Install Asciidoctor
27-
run: sudo apt-get update && sudo apt-get install -y asciidoctor
20+
run: sudo apt-get install -y asciidoctor
2821

29-
# Step 3: Run the Vale GitHub Action.
30-
# This action automatically downloads Vale and runs it against your files.
31-
# It will use the configuration file (.vale.ini) from your repository.
3222
- name: Run Vale on AsciiDoc files
33-
uses: errata-ai/vale-action@v2.1.1
23+
uses: errata-ai/vale-action@v2
3424
with:
35-
# Specify that Vale should only lint AsciiDoc files.
36-
files: '["**/*.adoc"]'
37-
38-
# The action can post review comments directly on your pull requests.
39-
# This requires a GITHUB_TOKEN with appropriate permissions.
25+
files: posts
26+
filter_mode: nofilter
27+
vale_flags: "--glob=*.adoc"
28+
reporter: github-check
29+
fail_on_error: true
4030
env:
4131
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.vale.ini

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# .vale.ini
22

3-
# The lowest alert level to display ("suggestion", "warning", or "error").
4-
MinAlertLevel = suggestion
5-
6-
# Path to your custom styles directory.
7-
# Create a 'styles' folder in your repo and add your Vale styles there.
83
StylesPath = styles
4+
MinAlertLevel = suggestion
95

10-
# You can list packages from the StylesPath here.
11-
# For example, if you download and add the 'Microsoft' style:
126
Packages = Microsoft, Google
137

148
[*.adoc]
File renamed without changes.

0 commit comments

Comments
 (0)