accounts-frontend/.travis.yml

54 lines
1.1 KiB
YAML
Raw Normal View History

2019-03-10 21:50:32 +03:00
language: node_js
2019-03-10 21:53:10 +03:00
node_js:
- "11"
2019-03-11 00:35:56 +03:00
cache:
yarn: true
directories:
- node_modules
2019-03-10 21:47:20 +03:00
addons:
ssh_known_hosts: account.ely.by
2019-03-10 21:47:20 +03:00
2019-03-11 00:02:38 +03:00
env:
2019-03-11 00:03:50 +03:00
global:
- GA_ID=UA-45299905-3
- SENTRY_CDN="https://088e7718236a4f91937a81fb319a93f6@sentry.ely.by/2"
2019-03-11 00:02:38 +03:00
script:
- yarn lint
- yarn flow
- yarn test
2019-03-11 00:02:38 +03:00
- export VERSION="${TRAVIS_TAG:-${TRAVIS_BRANCH}-${TRAVIS_COMMIT:0:7}}"
- |
echo "
module.exports = {
version: '$VERSION',
ga: {id: '$GA_ID'},
sentryCdn: '$SENTRY_CDN',
};
" > config/env.js
- 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:
2019-04-06 16:53:47 +02:00
- provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: dist/**/*
skip_cleanup: true
draft: true
on:
branch: master
- provider: script
skip_cleanup: true
script: echo "put -r $TRAVIS_BUILD_DIR/dist/* accounts-frontend/" | sftp deploy@account.ely.by
on:
tags: true