ci: PR 被批准合并后才会执行部署 workflow
This commit is contained in:
parent
64dda84387
commit
a5a8739e5e
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
@ -4,15 +4,18 @@ on:
|
|||||||
# 推送时执行
|
# 推送时执行
|
||||||
push:
|
push:
|
||||||
branches: [dev]
|
branches: [dev]
|
||||||
# pr 时执行
|
# pr 被批准合并时执行 1
|
||||||
pull_request:
|
pull_request_review:
|
||||||
branches: [dev]
|
branches: [dev]
|
||||||
|
types: [submitted]
|
||||||
# 可手动执行
|
# 可手动执行
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# 部署后端服务
|
# 部署后端服务
|
||||||
deploy-server:
|
deploy-server:
|
||||||
|
# pr 被批准合并时执行 2
|
||||||
|
if: github.event.review.state == 'approved'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# 1、检出源码
|
# 1、检出源码
|
||||||
|
Loading…
Reference in New Issue
Block a user