Skip to content

Instantly share code, notes, and snippets.

@jpomykala
Created April 12, 2019 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpomykala/3e5abba44b5d4eb73d78c1edc8353ba1 to your computer and use it in GitHub Desktop.
Save jpomykala/3e5abba44b5d4eb73d78c1edc8353ba1 to your computer and use it in GitHub Desktop.
S3 frontend deployment CodePipeline
version: 0.1
phases:
install:
commands:
# Install nodejs https://nodejs.org/en/download/package-manager/
- curl -sL https://deb.nodesource.com/setup_7.x | bash -
- apt-get install -y nodejs
# Install yarn natively https://yarnpkg.com/en/docs/install#linux-tab
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update
- apt-get install -y yarn
pre_build:
commands:
- yarn install
build:
commands:
- yarn run build-css
- yarn run build-app
artifacts:
type: zip
files:
- '**/*'
base-directory: 'build*'
cache:
paths:
- 'node_modules/**/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment