From aa538fffdc3d20dc7953e7abc1866da309cb87d7 Mon Sep 17 00:00:00 2001 From: JWJung-99 <39busy@naver.com> Date: Sat, 30 Nov 2024 13:19:56 +0900 Subject: [PATCH] =?UTF-8?q?Deploy:=20=EB=B0=B0=ED=8F=AC=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=ED=99=94=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 28 +++++++++++++++++----------- deploy.sh | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bcb576f..2542b31 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,13 +8,16 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check Node v run: node -v - name: Install pnpm - run: npm install -g pnpm + run: npm install -g pnpm@9.14.2 + + - name: Check pnpm version + run: pnpm -v - name: Install Dependencies run: pnpm install --frozen-lockfile @@ -23,23 +26,26 @@ jobs: run: pnpm build - name: zip create - run: zip -qq -r ./build.zip . + run: zip -qq -r build.zip build/ shell: bash - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ${{ secrets.AWS_REGION }} - name: Upload to S3 - run: | - aws s3 cp --region ap-northeast-2 ./build.zip s3://toucheese-team4-s3/build.zip + run: aws s3 cp build.zip s3://toucheese-team4-s3/build.zip + + - name: Verify S3 Upload + run: aws s3 ls s3://toucheese-team4-s3/ - name: Deploy - run: aws deploy create-deployment - --application-name TOUCHEESE-TEAM4 - --deployment-config-name CodeDeployDefault.AllAtOnce - --deployment-group-name TOUCHEESE-TEAM4-Deploy-Group - --s3-location bucket=toucheese-team4-s3,bundleType=zip,key=build.zip + run: | + aws deploy create-deployment \ + --application-name TOUCHEESE-TEAM4 \ + --deployment-config-name CodeDeployDefault.AllAtOnce \ + --deployment-group-name TOUCHEESE-TEAM4-Deploy-Group \ + --s3-location bucket=toucheese-team4-s3,bundleType=zip,key=build.zip diff --git a/deploy.sh b/deploy.sh index 52c081f..df656c6 100644 --- a/deploy.sh +++ b/deploy.sh @@ -5,4 +5,4 @@ cd $REPOSITORY sudo pnpm install -sudo npx pm2 reload all \ No newline at end of file +sudo pnpm exec pm2 reload all \ No newline at end of file