Created
October 18, 2018 05:43
-
-
Save flaudisio/0b08f80735cb5677aac8a7c695a12e44 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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