Skip to content

Version 0.0: 11차 배포 테스트 [CloudFront 캐시 실패] #14

Version 0.0: 11차 배포 테스트 [CloudFront 캐시 실패]

Version 0.0: 11차 배포 테스트 [CloudFront 캐시 실패] #14

Workflow file for this run

name: Deploy
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2 # workflow에서 액세스할 수 있도록 저장소를 체크아웃
# - 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]
- name: Check pnpm version
run: pnpm -v
- name: Install Dependencies
run: pnpm install
- name: Build
run: pnpm build
- 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 }}
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: '/*'
continue-on-error: true