From 53af0a11de2f7c6bbf86e3ec524ab9bd4b765b42 Mon Sep 17 00:00:00 2001 From: devMtn30 Date: Sat, 22 Jul 2023 19:51:43 +0900 Subject: [PATCH] =?UTF-8?q?application=20properties=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=20=ED=9B=84=20=EB=B0=B0=ED=8F=AC=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit settings에서 설정한 security application.properties를 새로 복사, 생성해 배포할 수 있도록 변경하였습니다. --- .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 d7c5f3b..d850cc2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,15 +34,21 @@ jobs: distribution: 'temurin' java-version: '11' - # (3) 권한 설정 + # (3) application properties 파일 새로 만들기 + - uses: actions/checkout@v3 + - run: touch ./src/main/resources/application.properties + - run: echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.properties + - run: cat ./src/main/resources/application.properties + + # (4) 권한 설정 - name: Run chmod to make gradlew executable run: chmod +x gradlew - # (3) Gradle build (Test 제외) + # (5) Gradle build (Test 제외) - name: Build with Gradle run: ./gradlew clean build -x test - # (4) AWS 인증 (IAM 사용자 Access Key, Secret Key 활용) + # (6) AWS 인증 (IAM 사용자 Access Key, Secret Key 활용) - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -50,7 +56,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} - # (5) 빌드 결과물을 S3 버킷에 업로드 + # (7) 빌드 결과물을 S3 버킷에 업로드 - name: Upload to AWS S3 run: | aws deploy push \ @@ -59,7 +65,7 @@ jobs: --s3-location s3://$S3_BUCKET_NAME/$GITHUB_SHA.zip \ --source . - # (6) S3 버킷에 있는 파일을 대상으로 CodeDeploy 실행 + # (8) S3 버킷에 있는 파일을 대상으로 CodeDeploy 실행 - name: Deploy to AWS EC2 from S3 run: | aws deploy create-deployment \