fix: 코드 위치 수정 #8
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: Deploy to CloudFront | |
on: | |
push: | |
branches: [ "fix/#50-fix-deploy" ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build project | |
run: | | |
cd vue3-yonsei-golf | |
yarn install | |
yarn build | |
- name: Set .env file | |
run: | | |
touch .env | |
echo "${{ secrets.VUE_SECRETS }}" > .env | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Upload to S3 test | |
run: | | |
aws s3 sync ./vue3-yonsei-golf/dist/ s3://${{ secrets.S3_BUCKET_NAME }} --region ${{ secrets.AWS_REGION }} | |
- name: Invalidate CloudFront Cache | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*" |