Skip to content

Commit

Permalink
Merge pull request #13 from TEAM-FLASH/dev
Browse files Browse the repository at this point in the history
Version 0.0 : 4차 배포 테스트
  • Loading branch information
JWJung-99 authored Nov 30, 2024
2 parents aa2f906 + aa538ff commit 2d9aafb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

- name: Check pnpm version
run: pnpm -v

- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -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
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cd $REPOSITORY

sudo pnpm install

sudo npx pm2 reload all
sudo pnpm exec pm2 reload all

0 comments on commit 2d9aafb

Please sign in to comment.