Skip to content

Commit dea979c

Browse files
authored
添加PR检查
1 parent 980d945 commit dea979c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/pr-check.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: docs
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
docs:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
15+
fetch-depth: 0
16+
ref: ${{ github.event.pull_request.head.sha }}
17+
18+
- name: set pnpm
19+
uses: pnpm/action-setup@v4
20+
21+
- name: set Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
# 选择要使用的 node 版本
25+
node-version: 22
26+
# 缓存 pnpm 依赖
27+
cache: pnpm
28+
29+
- name: install
30+
run: pnpm install --frozen-lockfile
31+
32+
# 运行构建脚本
33+
- name: 构建 VuePress 站点
34+
run: pnpm docs:build

0 commit comments

Comments
 (0)