Skip to content

Instantly share code, notes, and snippets.

@flaudisio
Created October 18, 2018 05:43
Show Gist options
  • Save flaudisio/0b08f80735cb5677aac8a7c695a12e44 to your computer and use it in GitHub Desktop.
Save flaudisio/0b08f80735cb5677aac8a7c695a12e44 to your computer and use it in GitHub Desktop.
image: node:8
stages:
- build
- test
- deploy
variables:
NODE_ENV: production
before_script:
- npm install
Build:
stage: build
script:
- npm run build
artifacts:
paths:
- dist/
expire_in: 7 days
Test:
stage: test
script:
- npm test
allow_failure: true
Deploy:
stage: deploy
image: python:3.6-alpine
variables:
SITE_BUCKET: bucket-site-exemplo
before_script:
- pip install 'awscli < 2.0'
script:
- aws s3 sync --delete dist/ s3://$SITE_BUCKET
only:
- master
- tags
when: manual
allow_failure: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment