Skip to content

Commit 9507342

Browse files
维护:在 PR 时提交 Lint Fix 结果 (#332)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fb1fe53 commit 9507342

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

.github/workflows/ci-pr.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 部署 (预览环境)
1+
name: ci-pr
22

33
on:
44
pull_request:
@@ -13,16 +13,22 @@ jobs:
1313
contents: write
1414
pull-requests: write
1515
with:
16-
fix: false
16+
fix: true
17+
secrets: inherit
1718

1819
build:
1920
name: 构建文档
21+
needs:
22+
- lint
2023
uses: ./.github/workflows/build.yml
2124

2225
upload:
23-
name: 上传运行信息
26+
name: 请求部署预览
2427
runs-on: ubuntu-latest
2528
if: github.repository == 'zotero-chinese/wiki' && github.event_name == 'pull_request'
29+
needs:
30+
- lint
31+
- build
2632
steps:
2733
- name: 保存 PR 编号
2834
run: |

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 部署(生产环境)
1+
name: ci
22

33
on:
44
push:

.github/workflows/deploy-preview.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: 部署 (预览环境) 后处理
1+
name: 部署预览
22

33
on:
44
workflow_run:
55
workflows:
6-
- 部署 (预览环境)
6+
- ci-pr
77
types:
88
- completed
99

.github/workflows/lint.yml

+1-14
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,14 @@ on:
77
required: true
88
type: boolean
99

10-
# permissions:
11-
# contents: write
12-
# pull-requests: write
13-
1410
jobs:
1511
lint:
1612
runs-on: ubuntu-latest
1713
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: 签出仓库
2515
uses: actions/checkout@v4
26-
if: github.event_name == 'pull_request'
2716
with:
2817
fetch-depth: 0
29-
repository: ${{ github.event.pull_request.head.repo.full_name }}
30-
ref: ${{ github.event.pull_request.head.ref }}
3118

3219
- name: 设置 pnpm
3320
uses: pnpm/action-setup@v3

0 commit comments

Comments
 (0)