|
1 | 1 | # .github/workflows/vale.yml |
2 | | -name: Check AsciiDoc with Vale |
| 2 | +name: Check AsciiDoc with vale |
3 | 3 |
|
4 | | -# This action runs on every push and pull request to the main branch. |
5 | | -# You can customize this to fit your branching strategy. |
6 | 4 | on: |
7 | 5 | push: |
8 | | - branches: |
9 | | - - main |
| 6 | + paths: |
| 7 | + - 'posts/**/*.adoc' |
10 | 8 | pull_request: |
11 | | - branches: |
12 | | - - main |
13 | | - |
| 9 | + paths: |
| 10 | + - 'posts/**/*.adoc' |
14 | 11 | 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 |
19 | 15 | 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 |
23 | 18 |
|
24 | | - # Step 2: Set up Ruby and install Asciidoctor. |
25 | | - # Vale can use Asciidoctor to accurately parse .adoc files. |
26 | 19 | - name: Install Asciidoctor |
27 | | - run: sudo apt-get update && sudo apt-get install -y asciidoctor |
| 20 | + run: sudo apt-get install -y asciidoctor |
28 | 21 |
|
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. |
32 | 22 | - name: Run Vale on AsciiDoc files |
33 | | - uses: errata-ai/vale-action@v2.1.1 |
| 23 | + uses: errata-ai/vale-action@v2 |
34 | 24 | 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 |
40 | 30 | env: |
41 | 31 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
0 commit comments