Skip to content

Commit

Permalink
Merge pull request #18 from TEAM-FLASH/dev
Browse files Browse the repository at this point in the history
Version 0.0 : 9차 배포 테스트
  • Loading branch information
JWJung-99 authored Dec 4, 2024
2 parents 5934651 + 2aee6ae commit 00c2dba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
46 changes: 22 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
name: Deploy

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v2 # workflow에서 액세스할 수 있도록 저장소를 체크아웃

- name: Check Node v
run: node -v
# - name: Create .env file
# run: |
# echo "VITE_API_KEY=${{ secrets.VITE_API_KEY }}" >> .env
# echo "VITE_NCBI_URL=${{ secrets.VITE_NCBI_URL }}" >> .env

- name: Install pnpm
run: npm install -g [email protected]
Expand All @@ -25,26 +33,16 @@ jobs:
- 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@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
- name: S3 Deploy
run: aws s3 sync ./dist s3://toucheese-team4-s3/ --acl bucket-owner-full-control
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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,key=build.zip,bundleType=zip
AWS_REGION: ${{ secrets.AWS_REGION }}
DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_ID }}
- name: Invalidate CloudFront Cache
uses: chetan/invalidate-cloudfront-action@master
env:
AWS_DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_ID }}
PATHS: '/index.html'
continue-on-error: true
1 change: 1 addition & 0 deletions tsconfig.app.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./src/app.tsx","./src/main.tsx","./src/routes.tsx","./src/vite-env.d.ts","./src/components/layout/layout.tsx","./src/hooks/usehook.ts","./src/pages/home/home.tsx","./src/store/useuserstore.ts","./src/styles/common.tsx","./src/styles/globalstyles.tsx","./src/styles/variables.tsx","./src/tests/home.test.tsx","./src/types/types.ts","./src/utils/utils.ts"],"version":"5.6.3"}

0 comments on commit 00c2dba

Please sign in to comment.