File tree 4 files changed +13
-20
lines changed
4 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 1
- name : 部署 (预览环境)
1
+ name : ci-pr
2
2
3
3
on :
4
4
pull_request :
@@ -13,16 +13,22 @@ jobs:
13
13
contents : write
14
14
pull-requests : write
15
15
with :
16
- fix : false
16
+ fix : true
17
+ secrets : inherit
17
18
18
19
build :
19
20
name : 构建文档
21
+ needs :
22
+ - lint
20
23
uses : ./.github/workflows/build.yml
21
24
22
25
upload :
23
- name : 上传运行信息
26
+ name : 请求部署预览
24
27
runs-on : ubuntu-latest
25
28
if : github.repository == 'zotero-chinese/wiki' && github.event_name == 'pull_request'
29
+ needs :
30
+ - lint
31
+ - build
26
32
steps :
27
33
- name : 保存 PR 编号
28
34
run : |
Original file line number Diff line number Diff line change 1
- name : 部署(生产环境)
1
+ name : ci
2
2
3
3
on :
4
4
push :
Original file line number Diff line number Diff line change 1
- name : 部署 (预览环境) 后处理
1
+ name : 部署预览
2
2
3
3
on :
4
4
workflow_run :
5
5
workflows :
6
- - 部署 (预览环境)
6
+ - ci-pr
7
7
types :
8
8
- completed
9
9
Original file line number Diff line number Diff line change 7
7
required : true
8
8
type : boolean
9
9
10
- # permissions:
11
- # contents: write
12
- # pull-requests: write
13
-
14
10
jobs :
15
11
lint :
16
12
runs-on : ubuntu-latest
17
13
steps :
18
- - name : 签出仓库 (base)
19
- uses : actions/checkout@v4
20
- if : github.event_name != 'pull_request'
21
- with :
22
- fetch-depth : 0
23
-
24
- - name : 签出仓库 (PR)
14
+ - name : 签出仓库
25
15
uses : actions/checkout@v4
26
- if : github.event_name == 'pull_request'
27
16
with :
28
17
fetch-depth : 0
29
- repository : ${{ github.event.pull_request.head.repo.full_name }}
30
- ref : ${{ github.event.pull_request.head.ref }}
31
18
32
19
- name : 设置 pnpm
33
20
uses : pnpm/action-setup@v3
You can’t perform that action at this time.
0 commit comments