awss3-deploy

Deploy artefacts with aws-cli to S3

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
awss3-deploy
301.0.17 years ago7 years agoMinified + gzip package size for awss3-deploy in KB

Readme

awss3-deploy
!Build Statustravis-imagetravis-url !npm versionnpm-imagenpm-url !Licenselicense-imagelicense-url
Deploy artefacts with aws-cli to S3

Deploys a local directory to a dest directory of an S3 bucket. Sets a cache-control header to a far-future expiry (one year) for everything except index.html, which is set to no-cache, no-store. Archives existing dest under a datetime directory scheme. Intended to be used as a TravisCI deploy scripttravis-dpl.

Installation

# pip install awscli
npm install --save awss3-deploy

Usage

BUCKET="mybucket" LOCAL_DIR="dist" UPLOAD_DIR="dev" ./node_modules/.bin/awss3-deploy

TravisCI

.travis.yml:
before_deploy:
  - export BUCKET=mybucket LOCAL_DIR=dist UPLOAD_DIR=dev
deploy:
  provider: script
  script: awss3-deploy
  skip_cleanup: true

ITYMFAQLT

I think you might frequently ask questions like these

Why not Travis' default S3 deployment provider?

  • It does not support per-object cache-control headers (yet; see: #170)
  • We needed additional life-cycle/archival rules (alternatively, AWS Lambda could be used)

Author

© 2016 Tom Vincent (https://tlvince.com)

License

Released under the MIT license.