Skip to content

Commit 2c864d4

Browse files
committed
fix deployment when merged to main and testing success
1 parent 846a79f commit 2c864d4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
name: pk web site backend deployment
22

33
on:
4-
push:
5-
branches:
6-
- main # main 브랜치에 푸시될 때만 실행
4+
workflow_run:
5+
workflows:
6+
- "pk web site backend testing"
7+
types:
8+
- completed
9+
10+
env:
11+
SHA: ${{ github.sha }}
712

813
jobs:
914
deploy:
15+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
1016
runs-on: ubuntu-latest
1117

1218
steps:
@@ -16,6 +22,7 @@ jobs:
1622
host: ${{ secrets.HOSTNAME }}
1723
username: ${{ secrets.USERNAME }}
1824
key: ${{ secrets.KEY }}
25+
envs: SHA
1926
script: |
2027
cd python.or.kr && git pull
2128
@@ -25,5 +32,6 @@ jobs:
2532
host: ${{ secrets.HOSTNAME }}
2633
username: ${{ secrets.USERNAME }}
2734
key: ${{ secrets.KEY }}
35+
envs: SHA
2836
script: |
2937
cd python.or.kr && bash deploy_prod.sh

0 commit comments

Comments
 (0)