-
Notifications
You must be signed in to change notification settings - Fork 67
43 lines (41 loc) · 1.25 KB
/
ci-spell-checking.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: ci-spell-checking
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Get changed files in the content folder
id: changed-files-specific
uses: tj-actions/changed-files@v41
with:
files: ./content/
- name: Install Vale
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
sudo apt-get update
sudo apt-get install curl
curl -Ls https://api.github.com/repos/errata-ai/vale/releases/latest \
| grep "browser_download_url.*vale_[0-9.]*_Linux_64-bit.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| xargs curl -Ls \
| tar xz
sudo mv ./vale /usr/bin/vale
vale --config=./.github/.vale.ini sync
- name: Run Vale
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: vale --config=./.github/.vale.ini ${{ steps.changed-files-specific.outputs.all_changed_files }}