diff --git a/.travis.yml b/.travis.yml index 4c80169..23999f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/deploy_rsa.enc b/deploy_rsa.enc new file mode 100644 index 0000000..ed282b2 Binary files /dev/null and b/deploy_rsa.enc differ