Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This file is used with a nuxt + aws cli + s3 workflow so that your artifacts get gzipped.
- # tested only on osx
- # Create files.
- nuxt generate
- wait
- # Compress dist files.
- gzip -r -9 dist/
- # Remove .gz file extension.
- while IFS= read -r file; do mv $file ${file%.gz}; done < <(find dist/ -type f -name "*.gz")
- # Deploy
- aws s3 cp dist s3://{bucket-name-here} --recursive --content-encoding gzip --cache-control public,max-age=30672000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement