-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
68 lines (63 loc) · 1.66 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
63
64
65
66
67
68
# .travis.yml
stages:
- test
- gh-pages
- deploy
jobs:
include:
- stage: test
name: "Running Tests"
language: node_js
node_js:
- '9.3'
before_install:
- cd mobile && yarn
script:
- yarn test
cache:
directories:
- ./mobile/node_modules
- stage: gh-pages
name: "Deploying github pages"
if: branch = master
sudo: required
language: node_js
services:
- docker
node_js:
- '8'
only:
- master
cache:
yarn: true
before_install:
- docker pull lucascst/gh-pages-docker-travis
script:
- echo "GH_NAME=${GH_NAME}" >> docs/.env
- echo "GH_EMAIL=${GH_EMAIL}" >> docs/.env
- echo "GH_TOKEN=${GH_TOKEN}" >> docs/.env
- docker run -v `pwd`:"/app" -w "/app" --env-file docs/.env lucascst/gh-pages-docker-travis bash -c "cd docs; sh publish.sh"
- stage: deploy
name: "Deploying to production"
if: branch = master
node_js:
- '9.3'
script:
- cd mobile
- bash setup-config.sh production
- cp config/app-production.json app.json
- yarn add expo-cli
- yarn expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD
- yarn expo publish --non-interactive
- stage: deploy
name: "Deploying to staging"
if: branch = dev
node_js:
- '9.3'
script:
- cd mobile
- bash setup-config.sh staging
- cp config/app-development.json app.json
- yarn add expo-cli
- yarn expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD
- yarn expo publish --non-interactive