Skip to content

Instantly share code, notes, and snippets.

@lanches-kurashita
Created August 20, 2018 07:47
Show Gist options
  • Save lanches-kurashita/145f1b5a9ab2e2a73c2e2267cc035336 to your computer and use it in GitHub Desktop.
Save lanches-kurashita/145f1b5a9ab2e2a73c2e2267cc035336 to your computer and use it in GitHub Desktop.
buildspec for AWS CodeBuild
version: 0.2
phases:
install:
commands:
- echo update npm...
- npm install -g n
- n latest
- npm update -g npm
- echo node -v
- node -v
- echo npm -v
- npm -v
- echo install yarn...
- npm install -g yarn
- echo yarn -v
- yarn -v
pre_build:
commands:
- echo Installing source NPM dependencies...
- yarn install
build:
commands:
- echo Build started on `date`
- echo Compiling the Node.js code
- yarn run build
post_build:
commands:
- echo Build completed on `date`
- echo Distributing to S3...
- aws s3 sync dist/develop s3://[アップロード用のS3バケット名] --delete --acl public-read
artifacts:
files:
- dist/develop/**/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment