Skip to content

Commit

Permalink
Merge pull request #10 from TEAM-FLASH/dev
Browse files Browse the repository at this point in the history
Version 0.0
  • Loading branch information
JWJung-99 authored Nov 29, 2024
2 parents 743b57b + fdcaf70 commit 5e18088
Show file tree
Hide file tree
Showing 16 changed files with 760 additions and 12 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Check Node v
run: node -v

- name: Install pnpm
run: npm install -g pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: zip create
run: zip -qq -r ./build.zip .
shell: bash

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
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
- 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# pem file
*.pem
16 changes: 16 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ubuntu/deploy
overwrite: yes
permissions:
- object: /home/ubuntu/deploy
owner: root
group: root
mode: 755
hooks:
AfterInstall:
- location: deploy.sh
timeout: 1000
runas: root
8 changes: 8 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
REPOSITORY=/home/ubuntu/deploy

cd $REPOSITORY

sudo pnpm install

sudo npx pm2 reload all
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"test:run": "vitest run"
},
"dependencies": {
"@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.5",
"@tanstack/react-query": "^5.61.5",
"emotion": "^11.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet-async": "^2.0.5",
Expand Down
Loading

0 comments on commit 5e18088

Please sign in to comment.