A helper script that will deploy build folder to s3 and invalidates caches of service worker, s3 and cloudfront to avoid [not updating problem]
deploy-to-s3.sh:
# Enable printing executed commands
set x
trap "exit" INT| #!/bin/bash | |
| username="COGNITO_USER_NAME" | |
| password="PASSWORD" | |
| clientid="APP_CLIENT_ID" | |
| region="eu-west-1" | |
| aws_profile="AWS_CLI_PROFILE" | |
| response_json="" | |
| json_field='IdToken' |
| ffmpeg -ss 00:00:00 -i $(youtube-dl -f best -g 'YOUTUBE_URL') -t 00:01:00 -c copy DOWNLOAD_NAME.mp4 | |
| ## prerequisite -> ffmpeg, youtube-dl | |
| ## installation commands: | |
| # brew install ffmpeg | |
| # brew install youtube-dl |