-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
46 lines (37 loc) · 1.89 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: node_js
node_js:
- '10.19.0'
sudo: false
# Add your branch here to have it tested and deployed
branches:
only:
- master
before_install:
# Configure Git
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
# Get all tags of git repo
- git fetch origin 'refs/tags/*:refs/tags/*'
script:
- test "$TRAVIS_PULL_REQUEST" == "false" || npm run build:prod:fast
- test "$TRAVIS_BRANCH" != 'master' -o "$TRAVIS_PULL_REQUEST" != "false" || npm run build:prod
after_success:
# Bump version
- npm install mversion -g
- test "$TRAVIS_BRANCH" != 'master' -o "$TRAVIS_PULL_REQUEST" != "false" || test -n "$(git tag --contains)" || bin/bump-version
before_deploy:
# Set environment variables for Elastic Beanstalk deploy
- echo 'origin.ltonetwork.com' > dist/CNAME
- export ELASTIC_BEANSTALK_ENV="lto-site-staging"
- export ELASTIC_BEANSTALK_LABEL=$(git tag --contains)
- export TAG=$(git tag --contains)
- test -n "$ELASTIC_BEANSTALK_LABEL" || export ELASTIC_BEANSTALK_LABEL="${TRAVIS_BRANCH}-${TRAVIS_COMMIT:0:7}"
deploy:
- provider: pages
local_dir: dist/
skip_cleanup: true
github_token:
secure: "OyMIshy5El6Z5fa6FmmT1H5WYQnbmyEAO44fuk3Upqh5qMaVZJmZ+TpyJsatj+9FtuJ4JkxMcdgGU0uT8KB0a5Q3rxMC2QE4DtJF3VC76SGQcIOLQFeb7zpsOLaCKVLfP15t5IphQdXxsDZ7A+6yJkRIdcjReDu47OmJYBorVen+uNDQw2WIObnvlrQktFMObvHQhpkBrwrr6s3JV+3o7dy8cxufsUmi4M46OYisx2OFWQaEnSE6lxOtWsOerqPTC4fWEvWw8kn2VbgLgqvPF837PZz/GEfFNBkhdn0hVceZUnM2Zdkt2v9u9o21mdGiU/La31Q2m1IX459d138nAgPXhm2f3bAP9O6QvxVwZOt+2Lf9SczZaBo28K3jhnx8PoLttd9obx73SxHsPZkvLwB/VXnzr8TMdM8T72XE+f/NZw8TilsPnC61DRVFW3+YSNqqJH+f/jZelOfHZtPKOaaczPEgCARq8loo2O2vflyWUEXxYW5jZg3biddXxQjiAo1oDZwAe7BCMfihO/ysdB76rUgH4cU7dvwoN+UiDi6pri2eewIdDmbazLtLjhWEi7K3jct0VfxzhueTGiQh0OH50AUVOpAAODNKD93IT4xleVfC3VgqskfjcVc2+SSxGDrizgca7JHwIsk5pniAXCnBfdnuJ+sDaYBaQvMvARE="
keep_history: true
on:
branch: master