This is a simple utility to deploy to AWS S3 bucket and invalidate a cloudfront id. It is that straightforward. See usage below
Just place this in your code underneath your build action within the steps, update the variables and secrets and that is it.
- name: Deploy application to AWS S3 and invalidate cloudfront cache
uses: pukonu/action-deploy-webapp-aws@v.1.2.2
id: deploy
with:
build_path: './path/to/build/folder'
bucket_name: '<AWS BUCKET NAME>'
bucket_key: ''
distribution_invalidation_path: '/*'
empty_bucket: 'false' # set to true if you would like to empty the bucket first
env:
DISTRIBUTION_ID: '<DISTRIBUTION ID>'
AWS_REGION: '<AWS REGION>'
AWS_ACCESS_KEY_ID: '<AWS_ACCESS_KEY_ID>'
AWS_SECRET_ACCESS_KEY: '<AWS_SECRET_ACCESS_KEY>'