From c9b82b260025b905e14ab5f1ef9f8d15e52cbe31 Mon Sep 17 00:00:00 2001 From: jaeyoung Date: Sun, 16 Jun 2024 20:02:27 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20cloudfront=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EB=B0=8F=20=EC=BA=90=EC=8B=9C=20=EB=AC=B4=ED=9A=A8?= =?UTF-8?q?=ED=99=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 96c073c..f5efa2f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,3 +31,18 @@ jobs: - name: 빌드 run: | yarn build + + - name: AWS credentials 설정(aws resource접근) + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ap-northeast-2 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: S3 기존 파일들 전체 삭제 후 새로 업로드 + run: | + aws s3 rm --recursive s3://next-blog-project + aws s3 cp ./out s3://next-blog-project/ --recursive + + - name: Cloudfornt 캐시 무효화 + run: aws cloudfront create-invalidation --distribution-id E12Q5DCOCOBVQC --paths "/*"