Skip to content

Commit

Permalink
🔨 Fix: action 무효화 방법 변경
Browse files Browse the repository at this point in the history
#
  • Loading branch information
qilip committed Nov 1, 2023
1 parent ec980e0 commit c4f3e06
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
paths=$(find .output/public -name index.html | sed 's/\.output\/public//g' | awk 'BEGIN{ORS=" "} {print}')
echo "Found paths: $paths"
echo "PATHS=\"$paths\"" >> $GITHUB_ENV
echo "PATHS=$paths" >> $GITHUB_ENV
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v2
Expand All @@ -61,3 +61,15 @@ jobs:
AWS_REGION: 'ap-northeast-2'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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: Invalidate Cloudfront
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION }} --paths ${{ env.PATHS }}
env:
PATHS: ${{ env.PATHS }}

0 comments on commit c4f3e06

Please sign in to comment.