Skip to content

Feat/#92/admin event status #26

Feat/#92/admin event status

Feat/#92/admin event status #26

Workflow file for this run

name: Deploy to S3 and CloudFront
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install AWS CLI
run: sudo apt-get install -y awscli
- name: Install Dependencies
run: yarn install
working-directory: ./service
env:
VITE_API_URL: ${{ secrets.API_URL }}
- name: Build Project
run: yarn build
working-directory: ./service
env:
VITE_API_URL: ${{ secrets.API_URL }}
- name: Sync S3
uses: jakejarvis/[email protected]
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: "./service/dist" # 빌드된 파일들이 위치한 디렉토리
- name: Invalidate CloudFront Cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"
env:
AWS_REGION: "ap-northeast-2"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}