Skip to content

Commit

Permalink
Merge pull request #12 from Loliver1224/hotfix/deploy-setting
Browse files Browse the repository at this point in the history
Hotfix/deploy setting
  • Loading branch information
Loliver1224 authored Jun 24, 2023
2 parents 3581152 + 8433512 commit ae8cd14
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
aws-region: ap-northeast-1

- name: Setup node
uses: actions/setup-node@v3
with:
Expand All @@ -39,8 +32,11 @@ jobs:
run: yarn build

- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: |
echo "AWS S3 sync"
aws s3 sync --region ap-northeast-1 ./out s3://${{ secrets.AWS_S3_BUCKET}} --delete
aws s3 sync --region ap-northeast-1 out s3://${{ secrets.AWS_S3_BUCKET}} --delete
echo "AWS CloudFront reset"
aws cloudfront create-invalidation --region ap-northeast-1 --distribution-id ${{ secrets.AWS_CF_ID }} --paths "/*"

0 comments on commit ae8cd14

Please sign in to comment.