-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (62 loc) · 2.12 KB
/
pr-build.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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Pull request build
on:
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "LICENSE"
branches:
- "main"
jobs:
build:
name: Lint and build website
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: volta-cli/action@v4
- name: Install dependencies
run: npm install
- name: Lint code
run: npm run lint
- name: Build website
run: npm run build
markdown-check:
name: Check Markdown documents
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run LanguageTool
uses: reviewdog/action-languagetool@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
level: info
patterns: "**.md"
# LanguageTool flags - see https://languagetool.org/http-api/swagger-ui/#!/default/post_check
language: "en-US"
enabled_rules: "WHITESPACE_RULE,EN_QUOTES,DASH_RULE,WORD_CONTAINS_UNDERSCORE,UPPERCASE_SENTENCE_START,ARROWS,COMMA_PARENTHESIS_WHITESPACE,UNLIKELY_OPENING_PUNCTUATION,SENTENCE_WHITESPACE,CURRENCY,EN_UNPAIRED_BRACKETS,PHRASE_REPETITION,PUNCTUATION_PARAGRAPH_END,METRIC_UNITS_EN_US,ENGLISH_WORD_REPEAT_BEGINNING_RULE"
disabled_categories: "TYPOS,TYPOGRAPHY,CASING"
- name: Run misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
pattern: "**.md"
level: info
locale: "US"
- name: Check links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: "yes"
file-extension: ".md"
check-modified-files-only: "yes"
config-file: ".mlc.config.json"
folder-path: "blog, src/components/talks/abstracts, src/components/homepage"
base-branch: "main"