Skip to content

Commit

Permalink
Update prod-CD.yaml (#348)
Browse files Browse the repository at this point in the history
* Update prod-CD.yaml

* Update prod-CD.yaml
  • Loading branch information
wannte authored Mar 10, 2024
1 parent 199225d commit f888fa0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/prod-CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ jobs: # Job 설정

- name: Build # React Build
run: yarn build

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2

- name: Deploy # Upload build file to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: aws s3 cp --recursive --region ap-northeast-2 build s3://petition-bucket
- name: Upload To S3
run: aws s3 sync --delete build s3://petition-bucket/prod

- name: Invalidate CloudFront Cache
run: aws cloudfront create-invalidation --distribution-id E18QP4Q8ZHLODO --paths "/*"

0 comments on commit f888fa0

Please sign in to comment.