-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
72 lines (70 loc) · 2.71 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
69
70
71
72
branches:
only:
- master
- dev-travis
sudo: required
dist: trusty
language: node_js
git:
depth: 10
node_js:
- "8"
before_install:
- export PATH=$(python -c 'from sys import argv;from collections import OrderedDict as od;print(":".join(od((p,None) for p in argv[1].split(":") if p.startswith("/")).keys()))' "$PATH")
install:
- yarn install
before_script:
- export VERSION=v$(node -e "console.log(require('./package.json').version);")
- export TRAVIS_TAG=$VERSION
- echo $VERSION
- git config --local user.name "nicolaswurtz"
- git config --local user.email "nicolas.wurtz@sncf.fr"
- if [ $TRAVIS_BRANCH = 'master' ]; then git tag $VERSION; fi
cache:
directories:
- node_modules
- vendor/bundle
script:
- mkdir documentation
# Intern / metier
- yarn build-intern
- yarn dist-intern
- yarn dist-intern-full
- if [ $TRAVIS_BRANCH = 'master' ]; then scripts/pushnpm.sh metier; fi
- yarn docs-compile-intern
- mv _gh_pages documentation/intern
- cd dist/
- zip -r ../documentation/intern/bootstrap-sncf.metier.${VERSION}.zip *
- cd ..
- rm -rf dist
# Extern / communication
- yarn build-extern
- yarn dist-extern
- yarn dist-extern-full
- if [ $TRAVIS_BRANCH = 'master' ]; then scripts/pushnpm.sh communication; fi
- yarn docs-compile-extern
- mv _gh_pages documentation/extern
- cd dist/
- zip -r ../documentation/extern/bootstrap-sncf.communication.${VERSION}.zip *
- cd ..
deploy:
- provider: releases
skip_cleanup: true
api-key: $GITHUB_TOKEN
overwrite: true
file:
- "documentation/intern/bootstrap-sncf.metier.${VERSION}.zip"
- "documentation/extern/bootstrap-sncf.communication.${VERSION}.zip"
on:
branch: master
tags: true
- provider: script
skip-cleanup: true
script: ./scripts/pushdocs.sh
on:
branch: master
env:
global:
- secure: fJWAJnjxe9zphe+yXjoBlPmizHZ+vaLy2AFOqsmCNN7JAvWwwZMxua2ChjwY3V16ZkOM4lzmuutNgscSLpQ9mFhjXqGxKoHjLiPjROk9Ip0LfnXyNU6Dm+6IoC+eHDhaNT8rK2g4WLs91Idl1aNLjjWuLHPDhgvn9QFks1CdhxPF/nj3MDcinzIcBF1lQZEdbTkSjnp2MtVYRHMnKdk6jlTmHOLHYRN8ByqRCtt0jaQPfbh5H9ndnowUiqUgbbb/BTTiIorV9IfgsNLy6lKsMwuOCeb5G9QsWeNQH4+hQ+O8QVAyJcm6B/jCwxwkOaKW+N2IYoNfyCpZflpAIZ5ObesUDhAuTBAoPmwAcbf4Xh+WLcpVRsRkS4ssM0lP2ffYHt/k2XmFvK8zN/ddsA6M97xxkCr7ARcVz7YGHU3Yo98uoG0mmYUccJgKy1PODx8rYqUQakRbxIlYy8krJzD/2WoP20oAwK4PTSLBbORufLz3JPUJgYQeLnbe2kojB8JJxCHaLx6WEwR7FKPIHW0WFIuhyjr7bvHftuzpIuA2sOkVgqWGoFGoKCrhwLlWvwNJkXCwUOIqO+WcOp80rxRv5d1BtYElXHPHu05VFAB8SrVoYeKuCJYbOE8MuqtqXq+up4PMNdjR0IgWK+Kk59w3vRNJ/H7CGetpVm5OB9xAn5s=
- GIT_DEPLOY_DOC_INT=https://$GITHUB_TOKEN@github.com/SNCFdevelopers/bootstrap-sncf-doc-int.git
- GIT_DEPLOY_DOC_EXT=https://$GITHUB_TOKEN@github.com/SNCFdevelopers/bootstrap-sncf-doc-ext.git