From 7b13c42de82b73b8945f1bc573eddbc896df0986 Mon Sep 17 00:00:00 2001 From: kimyechan Date: Tue, 23 Apr 2024 18:16:43 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EB=B0=B0=ED=8F=AC=EC=84=9C=EB=B2=84?= =?UTF-8?q?=EC=9A=A9=20CI=20=ED=8C=8C=EC=9D=B4=ED=94=84=EB=9D=BC=EC=9D=B8?= =?UTF-8?q?=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Deploy-CI.yaml | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/Deploy-CI.yaml diff --git a/.github/workflows/Deploy-CI.yaml b/.github/workflows/Deploy-CI.yaml new file mode 100644 index 00000000..9c26d73e --- /dev/null +++ b/.github/workflows/Deploy-CI.yaml @@ -0,0 +1,44 @@ +name: Feature Branch CI + +on: + push: + branches: + - main + +jobs: + build-and-package: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + + - name: Create and configure application.yml + run: | + echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml + echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml + + - name: Build with Gradle + run: | + cd baebae-BE + chmod +x ./gradlew + ./gradlew build + + - name: Create deployment package + run: | + zip -r deploy-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar + + - name: Configure AWS CLI && Upload file to Object Storage + env: + AWS_ACCESS_KEY_ID: ${{ secrets.NAVER_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.NAVER_SECRET_KEY }} + AWS_DEFAULT_REGION: 'us-east-2' + run: | + aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp test-package.zip s3://baebae-bucket/deploy-package +