From 93db53ba2e4fc842e6126f09b188c41e54981602 Mon Sep 17 00:00:00 2001 From: jooinjoo Date: Fri, 6 Dec 2024 18:30:25 +0900 Subject: [PATCH] =?UTF-8?q?MATE-90=20:=20[CHORE]=20deploy.yml=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b60f1667..8420aa8e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,6 @@ name: Deploy To EC2 -on: - push + +on: push jobs: deploy: @@ -15,9 +15,15 @@ jobs: distribution: temurin java-version: 17 - - name: Check if secret exists - if: "${{ secrets.APPLICATION_PROPERTIES != '' }}" - run: echo "Secret is set" + - name: Verify secret + run: | + if [ -z "${{ secrets.APPLICATION_PROPERTIES }}" ] + then + echo "❌ Secret is empty" + exit 1 + else + echo "✅ Secret exists" + fi - name: application-dev.yml 파일 만들기 run: echo "${{ secrets.APPLICATION_PROPERTIES }}" > ./src/main/resources/application.yml