version: 0.1 phases: install: commands: - printenv - npm install build: commands: - npm run build post_build: commands: - mkdir -p build - tar jcf build/myApp-$(date +%Y%m%d%H%m%S).tar.bz2 .eslintrc.js .gitignore README.md buildspec.yml package.json serverless.yml src test - npm install -g serverless - serverless -v -s $(echo ${CODEBUILD_INITIATOR} | cut -d'/' -f2 | cut -d'_' -f3) deploy artifacts: files: - build*/** discard-paths: yes