Skip to content

Instantly share code, notes, and snippets.

@aphexlog
Created November 9, 2020 18:46
Show Gist options
  • Select an option

  • Save aphexlog/aae746f8976d5a48778c890d9d75f921 to your computer and use it in GitHub Desktop.

Select an option

Save aphexlog/aae746f8976d5a48778c890d9d75f921 to your computer and use it in GitHub Desktop.
buildspec template for npm application
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment