accounts-frontend/.travis.yml

70 lines
1.7 KiB
YAML
Raw Permalink 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://95461d4ce6734b088c34fc4272d0a9e6@sentry.io/1463318"
- VERSION="${TRAVIS_TAG:-${TRAVIS_BRANCH}-${TRAVIS_COMMIT:0:7}}"
2019-12-08 00:03:48 +02:00
- FORCE_COLOR=1
2019-03-11 00:02:38 +03:00
script:
2019-12-07 23:58:43 +02:00
- yarn ci:check
- yarn build:quiet
before_deploy:
# Prepare ssh deployment
- 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
# Removing unneeded files
2019-12-30 10:21:28 +02:00
- rm -rf build/messages
- rm -rf build/*.css.map
2019-05-23 00:39:01 +03:00
# Move all source maps to it's own directory
2019-05-23 00:43:29 +03:00
- mkdir -p source-maps
2019-12-30 10:21:28 +02:00
- mv build/*.js.map source-maps/ 2>/dev/null; true
- cp build/*.js source-maps/
# Creating tar.gz and zip archives
2019-12-30 10:21:28 +02:00
- cd build
- tar -zcf ../build.tar.gz --exclude="*.map" *
- zip -rq ../build.zip * -x "*.map"
- cd ..
deploy:
2019-04-06 16:53:47 +02:00
- provider: releases
api_key: "$GITHUB_TOKEN"
file:
2019-12-30 10:21:28 +02:00
- build.tar.gz
- build.zip
2019-04-06 16:53:47 +02:00
skip_cleanup: true
draft: true
on:
branch: master
2019-12-11 15:34:04 +03:00
# - provider: script
# skip_cleanup: true
2019-12-30 10:21:28 +02:00
# script: echo "put -r $TRAVIS_BUILD_DIR/build/* accounts-frontend/" | sftp deploy@account.ely.by
2019-12-11 15:34:04 +03:00
# on:
# branch: master
- provider: script
skip_cleanup: true
script: >
curl -sL https://sentry.io/get-cli/ | bash &&
sentry-cli releases new -p $SENTRY_PROJECT $VERSION &&
sentry-cli releases set-commits --auto $VERSION &&
2019-05-23 00:39:01 +03:00
sentry-cli releases files $VERSION upload-sourcemaps source-maps &&
sentry-cli releases deploys $VERSION new -e "Production"
on:
branch: master