From a45a4e669220bb75a09c1e734c528757f080fb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=8A=B9=EC=A7=84?= Date: Sat, 16 Mar 2024 16:17:38 +0900 Subject: [PATCH] [CHORE] fix github actions workflow trigger --- .github/workflows/backend-cd.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend-cd.yml b/.github/workflows/backend-cd.yml index c38d94e..5f35ce1 100644 --- a/.github/workflows/backend-cd.yml +++ b/.github/workflows/backend-cd.yml @@ -1,5 +1,10 @@ name: TWTW Backend CD on: + push: + branches: + - master + paths: + - '.github/workflows/backend-cd.yml' workflow_run: branches: - "master" @@ -39,10 +44,14 @@ jobs: terraform_version: 1.0.0 - name: Terraform Init - run: terraform init + run: | + cd ./terraform + terraform init - name: Terraform Apply - run: terraform apply -auto-approve + run: | + cd ./terraform + terraform apply -auto-approve - name: Get EC2 instance IP id: get_ec2_ip