Skip to content

If you have your static websites allocated on S3 Buscket / CloadFront, and needs autoupload / replace files on your bucket? This script is for add on your NPM project for upload files deleting all oldest and creating distribution invalidation for create new cache.

Notifications You must be signed in to change notification settings

klich3/s3-cloudfornt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

S3 Upload & CloudFront Invalidation of last Distribution

If you have your static websites allocated on S3 Buscket / CloadFront, and needs autoupload / replace files on your bucket? This script is for add on your NPM project for upload files deleting all oldest and creating distribution invalidation for create new cache.

Instalation

Dependences: Is nedded to do:

  • Mac: brew install jq
  • Linux: apt i jq or yaml install jq

Also needs:

chmod +x ./deploy.sh

Usage

./deploy.sh <profile_name> <domain_name> <folder_to_upload> <region>

In your package.json file

...
"scripts": {
    "deploy-dev": "scripts/deploy.sh profile-name domain ./dist",
    ...
}
npm run deploy-dev

About

If you have your static websites allocated on S3 Buscket / CloadFront, and needs autoupload / replace files on your bucket? This script is for add on your NPM project for upload files deleting all oldest and creating distribution invalidation for create new cache.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages