Skip to content

Commit 9aba3fe

Browse files
committed
#45 fix: 프론트엔드, 백엔드 CI가 성공적으로 완료된 경우에만 동작하도록 설정 및 리전 설정
1 parent fd87726 commit 9aba3fe

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Deploy with Docker Compose
22

33
on:
4+
workflow_run:
5+
workflows: [ "Frontend CI", "Backend CI" ]
6+
types:
7+
- completed
48
workflow_dispatch:
59
push:
610
branches:
@@ -10,6 +14,8 @@ on:
1014

1115
jobs:
1216
deploy:
17+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
18+
1319
runs-on: ubuntu-latest
1420

1521
steps:
@@ -26,6 +32,7 @@ jobs:
2632
--protocol tcp \
2733
--port 22 \
2834
--cidr ${{ steps.ip.outputs.ipv4 }}/32
35+
--region ap-northeast-2
2936
3037
- name: Deploy to EC2 with docker-compose
3138
uses: appleboy/ssh-action@v0.1.10

0 commit comments

Comments
 (0)