-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from TEAM-FLASH/dev
Version 0.0 : 9차 배포 테스트
- Loading branch information
Showing
2 changed files
with
23 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |