Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#140] Fix: deploy 과정을 if문으로 분기 처리 #141

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ jobs:
aws-region: ap-northeast-2

- name: Deploy to AWS S3
if: github.ref == 'refs/heads/main'
env:
BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
run: |
aws s3 rm s3://$BUCKET_NAME/assets/ --recursive
aws s3 sync ./dist s3://$BUCKET_NAME

- name: CloudFront Invalidation
if: github.ref == 'refs/heads/main'
env:
CLOUD_FRONT_ID: ${{ secrets.AWS_CLOUDFRONT_ID }}
run: aws cloudfront create-invalidation --distribution-id $CLOUD_FRONT_ID --paths /*
Loading