Skip to content

Merge pull request #51 from THEGOODs-repo/dev #12

Merge pull request #51 from THEGOODs-repo/dev

Merge pull request #51 from THEGOODs-repo/dev #12

Workflow file for this run

name: S3 Deploy # Workflow 이름
on: # Event 감지
push:
branches:
- main
jobs: # Job 설정
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code. # Repo checkout
uses: actions/checkout@v2
- name: Check Node v # Node v 확인
run: node -v
- name: Install Dependencies # 의존 파일 설치
run: yarn install --frozen-lockfile
- name: Build # React Build
run: CI='false' yarn build
- name: Deploy # Upload build file to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SECRET_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ap-northeast-2
CI: ""
run: |
aws s3 cp --recursive --region ap-northeast-2 build s3://thegoods-dev
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_ID }} --paths "/*"