forked from makimenko/angular-template-for-threejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (47 loc) · 1.28 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
branches:
only:
- master
- /^greenkeeper/.*$/
language: node_js
node_js:
- node
os:
- linux
cache:
npm: true
override:
- npm ci
before_install:
# Google Chrome
#
# https://github.com/travis-ci/travis-ci/issues/272#issuecomment-14402117
# http://stackoverflow.com/questions/19255976/how-to-make-travis-execute-angular-tests-on-chrome-please-set-env-variable-chr
#
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
# Non-Chrome-related:
- npm install -g greenkeeper-lockfile
- npm install -g codecov
script:
- ng build atft
- ng lint
- ng test --watch=false --code-coverage
after_success:
- codecov
before_deploy:
# Setup files to be deploy to gh-pages in ./dist/gh-pagey-deploy
# 1. Compile, minify and deploy Angular application
- ng build --prod --base-href "https://makimenko.github.io/angular-template-for-threejs/demo/" --output-path ./dist/gh-pages-deploy/demo
# 2. Generate API documentation
- npm install -g @compodoc/compodoc
- compodoc -p src/tsconfig.app.json -d dist/gh-pages-deploy
deploy:
provider: pages
local-dir: dist/gh-pages-deploy
skip-cleanup: true
github-token: $GITHUB_PAGES_DEPLOYMENT_TOKEN
keep-history: true
on:
branch: master
target-branch: gh-pages