-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (55 loc) · 1.81 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
language: ruby
sudo: false
cache: bundler
rvm:
- 2.3
before_install:
- nvm install v12 && nvm use v12
- npm i -g npm
- npm i -g firebase-tools
- git clone https://jblew:${GH_TOKEN}@github.com/jblew/amerykahospital-personalizedadvice-settings.git settings
- |
if [[ $TRAVIS_BRANCH == "production" ]]; then
firebase use production
settings/scripts/select-production.sh
echo "Using production environment"
else
firebase use preprod
settings/scripts/select-preprod.sh
echo "Using preprod environment"
fi
- npm --prefix="./settings" ci && npm --prefix="./settings" run build
- npm --prefix="./public" install
- npm --prefix="./roles-manager-app" ci
- npm --prefix="./professional-panel" ci
script:
- node --version
# Build public website
- (cd public && bundle exec jekyll build)
# Build roles manager app
- npm --prefix="./roles-manager-app" run build
- mv ./roles-manager-app/dist ./public/_site/role-management
# Build medical professional app
- npm --prefix="./professional-panel" run build
- mv ./professional-panel/dist ./public/_site/professional-panel
# Test links on public website
- '(cd public && bundle exec htmlproofer --typhoeus-config "{ \"ssl_verifypeer\": false, \"ssl_verifyhost\": 0 }" ./_site)'
branches:
only:
- preprod
- production
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
addons:
apt:
packages:
- libcurl4-openssl-dev
deploy:
- provider: script
script: bash -c "node --version && npx firebase deploy --only hosting"
skip_cleanup: true
on:
tags: false
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(preprod|production)$