Simplify stages setup. Setup deployment script

This commit is contained in:
ErickSkrauch 2019-03-10 23:22:31 +03:00
parent 9adee5c937
commit 043f8a4f93
2 changed files with 20 additions and 12 deletions

View File

@ -4,16 +4,24 @@ node_js:
cache: yarn
jobs:
include:
- stage: Test
name: Lint
script: yarn lint
- name: Flow
script: yarn flow
- name: Test
script: yarn test
addons:
ssh_known_hosts: account.ely.by
- stage: Build
name: Build production assets
script: yarn build
script:
- yarn lint
- yarn flow
- yarn test
- yarn build:quiet
before_deploy:
- openssl aes-256-cbc -K $encrypted_dd5ad7a5f201_key -iv $encrypted_dd5ad7a5f201_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
deploy:
provider: script
skip_cleanup: true
script: scp -rp $TRAVIS_BUILD_DIR/dist/* deploy@account.ely.by:/var/deploy/accounts-frontend/
on:
branch: master

BIN
deploy_rsa.enc Normal file

Binary file not shown.