mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-30 02:32:58 +05:30
44 lines
925 B
YAML
44 lines
925 B
YAML
language: node_js
|
|
node_js:
|
|
- "11"
|
|
|
|
cache: yarn
|
|
|
|
addons:
|
|
ssh_known_hosts: account.ely.by
|
|
|
|
env:
|
|
- GA_ID=UA-45299905-3
|
|
- SENTRY_CDN="https://088e7718236a4f91937a81fb319a93f6@sentry.ely.by/2"
|
|
|
|
script:
|
|
- yarn lint
|
|
- yarn flow
|
|
- yarn test
|
|
- 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:
|
|
provider: script
|
|
skip_cleanup: true
|
|
script: |
|
|
sftp deploy@account.ely.by << EOL
|
|
put -r $TRAVIS_BUILD_DIR/dist/* accounts-frontend/
|
|
EOL
|
|
on:
|
|
branch: master
|