File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,17 +68,23 @@ jobs:
6868 aws-region : ap-northeast-2
6969 mask-aws-account-id : true
7070
71- - name : Verify AWS credentials
71+ - name : Verify AWS credentials and permissions
7272 run : |
73+ echo "Verifying AWS credentials..."
7374 aws sts get-caller-identity
75+ echo "Checking CloudFront permissions..."
7476 aws cloudfront list-distributions --max-items 1
77+ echo "Checking S3 permissions..."
78+ aws s3 ls s3://${{ secrets.S3_BUCKET }}
7579
7680 - name : Deploy to S3
7781 run : aws s3 sync dist/ s3://${{ secrets.S3_BUCKET }}/$S3_PREFIX --delete
7882
7983 - name : Invalidate CloudFront cache
8084 run : |
8185 echo "Creating invalidation for distribution $CLOUDFRONT_ID"
86+ aws cloudfront wait distribution-deployed --id $CLOUDFRONT_ID
8287 aws cloudfront create-invalidation \
8388 --distribution-id $CLOUDFRONT_ID \
84- --paths "/*"
89+ --paths "/*" \
90+ --debug
You can’t perform that action at this time.
0 commit comments