Skip to content

Instantly share code, notes, and snippets.

@tkssharma
Created May 12, 2019 18:07
Show Gist options
  • Save tkssharma/246d4f9e460edcc519c28853eda3c8ae to your computer and use it in GitHub Desktop.
Save tkssharma/246d4f9e460edcc519c28853eda3c8ae to your computer and use it in GitHub Desktop.
stages:
- build
- deploy
build prod:
image: node:10.15.0-stretch
stage: build
only:
- tags
script:
- npm install
# Build App
- npm run build
artifacts:
paths:
# Build folder
- dist/
expire_in: 1 hour
deploy prod:
image: python:latest
stage: deploy
only:
- tags
script:
- pip install awscli
- aws s3 sync ./dist s3://YOUR_BUCKET_NAME
build stage:
image: node:10.15.0-stretch
stage: build
only:
- master
script:
- npm install
# Build App
- npm run build-dev
artifacts:
paths:
# Build folder
- dist/
expire_in: 1 hour
deploy stage:
image: python:latest
stage: deploy
only:
- master
script:
- pip install awscli
- aws s3 sync ./dist s3://YOUR_DEV_BUCKET_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment