Skip to content

hotfix: deploy.yml 수정 #3

hotfix: deploy.yml 수정

hotfix: deploy.yml 수정 #3

Workflow file for this run

name: AWS_CICD
on:
push:
branches:
- develop
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
# S3 배포
- name: S3 Deploy
run: aws s3 sync ./build s3://<생성한 bucket 이름>/ --delete
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_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_DISTRIBUTION_ID: ${{ secrets.AWS_DISTRIBUTION_ID }}
PATHS: "/*"
continue-on-error: true