-
Notifications
You must be signed in to change notification settings - Fork 334
61 lines (56 loc) · 1.55 KB
/
linting.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Linting
on:
pull_request_target:
branches: [main]
types: [labeled,opened,reopened,synchronize]
jobs:
lint-markdown:
name: Lint markdown
if: >-
(
github.event.pull_request.head.repo.id == 21975579 ||
contains(github.event.pull_request.labels.*.name, 'build-fork')
) &&
contains(github.event.pull_request.labels.*.name, vars.LBL_MRKDWNPROSE)
runs-on: ubuntu-latest
strategy:
matrix:
site: ['platform', 'upsun']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: sites/${{ matrix.site }}/package-lock.json
- name: Run lint markdown
run: |
cd sites/${{ matrix.site }}
npm ci
npm run lint:markdown
lint-prose:
name: Lint Prose
if: >-
(
github.event.pull_request.head.repo.id == 21975579 ||
contains(github.event.pull_request.labels.*.name, 'build-fork')
) &&
contains(github.event.pull_request.labels.*.name, vars.LBL_MRKDWNPROSE)
runs-on: ubuntu-latest
strategy:
matrix:
site: ['platform', 'upsun']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Vale
uses: errata-ai/vale-action@reviewdog
with:
version: 3.0.7
fail_on_error: true
reporter: github-check
files: sites/${{ matrix.site }}/src
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}