-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 931 Bytes
/
pr-lint.yml
File metadata and controls
40 lines (33 loc) · 931 Bytes
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
name: Markdownlint
on:
pull_request:
branches: ["main"]
push:
branches: ["main","dev"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: set pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: set Node.js
uses: actions/setup-node@v4
with:
# 选择要使用的 node 版本
node-version: 22
# 缓存 pnpm 依赖
cache: pnpm
cache-dependency-path: docs/pnpm-lock.yaml
- name: install
run: pnpm install --frozen-lockfile
working-directory: ./docs
- name: build
run: pnpm markdownlint-cli2 "**/*.md"
working-directory: ./docs