Use native AWS CLI to upload to S3

This commit is contained in:
Alicia Sykes 2023-08-30 20:07:28 +01:00
parent cd2681fd84
commit 8688fd23f5

View File

@ -52,15 +52,18 @@ jobs:
run: | run: |
yarn install yarn install
yarn build yarn build
- name: Setup AWS
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: us-east-1
- name: Upload to S3 - name: Upload to S3
uses: shallwefootball/s3-upload-action@v1.3.3 env:
id: S3 AWS_S3_BUCKET: 'web-check-frontend'
with: run: aws s3 sync ./build/ s3://$AWS_S3_BUCKET/ --delete
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: 'web-check-frontend'
source_dir: './'
- name: Invalidate CloudFront cache - name: Invalidate CloudFront cache
uses: chetan/invalidate-cloudfront-action@v2.4 uses: chetan/invalidate-cloudfront-action@v2.4