From dd108b03159c929c4a8cef119da46da490ea6cc5 Mon Sep 17 00:00:00 2001 From: seokhee Date: Fri, 12 Jul 2024 12:07:37 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[#294]=20deploy:=20gitignore=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 364b66f4..b8e26bd6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ build/ application.yml application-test.yml +appspec.yml +scripts/ ## test를 위한 controller TestController.java From 33e8d3ebb8941e7f13ca982dea359ae6b7705552 Mon Sep 17 00:00:00 2001 From: seokhee Date: Fri, 12 Jul 2024 12:20:02 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[#294]=20deploy:=20github=20actions=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c4d0c48f..cefe7e7b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -45,7 +45,11 @@ jobs: run: | mkdir -p src/main/resources echo "${{ secrets.TEST_YML }}" | base64 --decode > src/main/resources/application-test.yml - find src + find src + # 2.5) secret설정한 appspec.yml 등록 + - name: Set appspec.yml + run: | + echo "${{ secrets.APPSPEC }}" > appspec.yml # - name: Set up MariaDB 10 # uses: getong/mariadb-action@v1.1 From a966d508dd28e95c5673d361c7ad356ff42d7541 Mon Sep 17 00:00:00 2001 From: seokhee Date: Fri, 12 Jul 2024 12:24:47 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[#294]=20deploy:=20appspec.yml,=20scripts/?= =?UTF-8?q?=20=EB=82=B4=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appspec.yml | 19 ------------------- scripts/execute-deploy.sh | 6 ------ 2 files changed, 25 deletions(-) delete mode 100644 appspec.yml delete mode 100644 scripts/execute-deploy.sh diff --git a/appspec.yml b/appspec.yml deleted file mode 100644 index 35085734..00000000 --- a/appspec.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 0.0 -os: linux - -files: - - source: / # 인스턴스에 복사할 디렉터리 경로 - destination: /home/ubuntu/Back-end # 인스턴스에서 파일이 복사되는 위치 - overwrite: yes # 복사할 위치에 파일이 있는 경우 대체 - -permissions: - - object: / # 권한이 지정되는 파일 or 디렉터리 - pattern: "**" # 매칭되는 패턴에만 권한 부여 - owner: ubuntu # object의 소유자 - group: ubuntu # object의 그룹 이름 - -hooks: - ApplicationStart: # CodeDeploy의 ApplicationStart 단계에서 실행 - - location: scripts/execute-deploy.sh - timeout: 60 - runas: ubuntu \ No newline at end of file diff --git a/scripts/execute-deploy.sh b/scripts/execute-deploy.sh deleted file mode 100644 index fc4942d3..00000000 --- a/scripts/execute-deploy.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -DEPLOY_SH=/home/ubuntu/Back-end/scripts/nginx-deploy.sh -DEPLOY_LOG=/home/ubuntu/Back-end/deploy.log -DEPLOY_ERROR_LOG=/home/ubuntu/Back-end/deploy-error.log - -sudo sh $DEPLOY_SH > $DEPLOY_LOG 2> $DEPLOY_ERROR_LOG & \ No newline at end of file