-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
68 lines (61 loc) · 1.84 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
# Used to trigger downstream rebuilds for
# Commenting out for now, untill build of self contained content packages is templated.
# script:
# - ./trigger-travis.sh contentascode activist-apprentice master $TOKEN
language: node_js
node_js:
- '8'
os:
- linux
# Add ons to allow nodegit to compile
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
install:
- wget https://github.com/jgm/pandoc/releases/download/1.19.2.1/pandoc-1.19.2.1-1-amd64.deb
- sudo dpkg -i pandoc-1.19.2.1-1-amd64.deb
- npm i -g docsmith@beta
- npm i -g activist-apprentice
- npm i -g exp
script:
- mkdir workspace && cd workspace
- apprentice init --non-interactive
- apprentice config
# Manually template with current course
- rm -rf ~/.content/packages/activist-apprentice-course-template
- cp -R $TRAVIS_BUILD_DIR ~/.content/packages/activist-apprentice-course-template
- cd ~/.content/packages/activist-apprentice-course-template
- npm install
# Build website
- cd $TRAVIS_BUILD_DIR/workspace
- apprentice start --clean --no-watch --baseurl /activist-apprentice/@apprentice/preview preview
# Build mobile app
# - apprentice start --clean --no-watch mobile
# - cd ~/.content/build/@apprentice/mobile
# - exp login -u $EXP_LOGIN -p $EXP_PASS
# - exp publish --non-interactive
deploy:
- provider: pages
local_dir: /home/travis/.content/build
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
on:
branch: master
condition: $TRAVIS_OS_NAME = linux
node: '7'
- provider: pages
local_dir: /home/travis/.content/build
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
node: '7'
branches:
only:
- master
except:
- /^v[0-9]/