feat: 빌드 에러 해결 및 ci/cd 해결 #1
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
name: AWS_CICD | ||
on: | ||
push: | ||
branches: [feat/#105] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: yarn install | ||
# 빌드 | ||
- name: Build | ||
run: yarn build | ||
# 배포 | ||
- name: S3 Deploy | ||
run: aws s3 sync ./build s3://<생성한 bucket 이름>/ --acl bucket-owner-full-control | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
# 기존 캐시 무효화 | ||
- name: Invalidate CloudFront Cache | ||
uses: chetan/invalidate-cloudfront-action@master | ||
env: | ||
AWS_DISTRIBUTION: ${{ secrets.AWS_DISTRIBUTION_ID }} | ||
PATHS: "/index.html" | ||
continue-on-error: true |