Skip to content

Commit 98ed88f

Browse files
authored
test(docs, lint): add markdown lint check to docs CI workflow (#5303)
1 parent 8b7fc94 commit 98ed88f

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@ jobs:
1616
- uses: actions/checkout@v2
1717
with:
1818
fetch-depth: 1
19+
- uses: actions/setup-node@v2
20+
with:
21+
node-version: 14
22+
- name: Get yarn cache directory path
23+
id: yarn-cache-dir-path
24+
run: echo "::set-output name=dir::$(yarn cache dir)"
25+
- uses: actions/cache@v2
26+
name: Yarn Cache
27+
id: yarn-cache
28+
with:
29+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
30+
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
31+
restore-keys: ${{ runner.os }}-yarn-v1
32+
- name: Yarn Install
33+
uses: nick-invision/retry@v2
34+
with:
35+
timeout_minutes: 3
36+
retry_wait_seconds: 30
37+
max_attempts: 3
38+
command: yarn --no-audit --prefer-offline
39+
- name: Lint
40+
run: yarn lint:markdown
1941
- name: Install Dependencies
2042
uses: nick-invision/retry@v2
2143
with:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
"build:all:clean": "lerna run build:clean",
88
"build:all:build": "lerna run build",
99
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
10+
"lint:markdown": "prettier --check \"docs/**/*.md\"",
1011
"lint:report": "eslint --output-file=eslint-report.json --format=json . --ext .js,.jsx,.ts,.tsx",
1112
"lint:spellcheck": "spellchecker --quiet --files=\"docs/**/*.md\" --dictionaries=\"./.spellcheck.dict.txt\" --reports=\"spelling.json\" --plugins spell indefinite-article repeated-words syntax-mentions syntax-urls frontmatter",
1213
"tsc:compile": "tsc --project .",
13-
"lint:all": "yarn lint && yarn lint:spellcheck && yarn tsc:compile",
14+
"lint:all": "yarn lint && yarn lint:markdown && yarn lint:spellcheck && yarn tsc:compile",
1415
"lerna:bootstrap": "lerna bootstrap",
1516
"lerna:link": "lerna link",
1617
"lerna:clean": "lerna clean",

0 commit comments

Comments
 (0)