This repository has been archived by the owner on Dec 25, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (89 loc) · 4.69 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# travis.yml validator
# https://lint.travis-ci.org/PhysikOnline-FFM/tinyGU
# https://github.com/travis-ci/travis-ci/issues/2856#issuecomment-58609666
# with an empty .travis.yml nothing works
# with only a script step we assume ruby
# with language: generic only the script step runs
# with language: c we set CC=gcc and run gcc --version, which is minimal, but still more than nothing
# https://loiane.com/2017/09/continuous-integration-with-angular-cli-travis-ci-firebase-greenkeeper-github/
# https://caveofcode.com/2017/05/publish-an-angular-app-to-github-pages/amp/
# https://medium.com/@cpavnn/deploy-to-firebase-hosting-from-github-3772fed05e72
# https://coryrylan.com/blog/deploy-angular-cli-apps-to-firebase
# actually thats just because of empty lines!!
# since travis interprets the windows newline as newline + '\n\ make sure the new lines are LF = \n and not CR LF = \r\n
# https://de.wikipedia.org/wiki/Zeilenumbruch#ASCII_und_EBCDIC
# to avoid that create .gitattributes with the line '.travis.yml eol=lf'
# https://github.com/dwyl/learn-travis
language: node_js
node_js:
- node # will use latest node
branches:
except:
- prototype
- backend_prototype
- mdl-prototype.discontinued
- gh-pages
- /^(?=.*(?:nobuild|dontbuild|nb))(?=.*(?:\.|-|\/|\\|_)).*$/
# dont build branches that have a suffix or prefix nobuild, dontbuild or nb seperated by .-_/\
# - /^(?=.*(?:dev|developement|test1?|patch))(?=.*(?:\.|-|\/|\\|_)).*$/
# - /^(?:dev|developement|test|patch)$/
# the last two lines exclude all branches that contain one of the strings only
# or seperated at beginning or end by .-_/\
# - master
# - /^greenkeeper/.*$/
# only:
# - master.ng5
# - prototype
cache:
directories:
- node_modules
before_script: # commands to run before the build step
# - npm install -g --silent @angular/cli
# - npm install -g @angular/cli
# - npm install --save @angular/material @angular/cdk
# - npm install --save @angular/animations
# - npm install @angular/flex-layout --save
- npm install
- chmod +x ./before_script.travis.sh
- ./before_script.travis.sh $TRAVIS_REPO_SLUG
# - travis encrypt "physikonline:$SLACK_TRAVIS_TOKEN#travisci" --add notifications.slack.rooms
# - cat .travis.yml
script: # the build step
- ng build --prod --base-href "https://physikonline-ffm.github.io/tinyGU/" --i18nFile src/locale/messages.de-DE.xlf --i18nFormat xlf --locale de
# - npm run build.prod
before_deploy:
- chmod +x ./before_deploy.travis.sh
- ./before_deploy.travis.sh
# http://www.backalleycoder.com/2016/05/13/sghpa-the-single-page-app-hack-for-github-pages/
# https://stackoverflow.com/questions/5411538/redirect-from-an-html-page
# get https://gist.github.com/ac3121fbc85ecdedd59b440b551dd02a.git
# https://stackoverflow.com/questions/13210880/replace-one-substring-for-another-string-in-shell-script
# https://stackoverflow.com/questions/2871181/replacing-some-characters-in-a-string-with-another-character
# https://stackoverflow.com/questions/47228723/how-to-pass-to-curl-file-with-replace-some-sequence
# http://tldp.org/LDP/abs/html/string-manipulation.html
# https://github.com/travis-ci/travis-ci/issues/2856#issuecomment-58609666
# https://github.com/codecov/example-bash/blob/master/.travis.yml
# https://www.ortussolutions.com/blog/build-test-and-deploy-your-module-with-travis-ci
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: dist
file:
on:
# branch: master
all_branches: true
notifications:
email: false
slack: # <USER>:<TOKEN>#<CHANNEL>
rooms:
# https://travis-encrypt.github.io/
# travis encrypt "<account>:<token>" --add notifications.slack -r <accountName>/<repoName>
# travis encrypt "<account>:<token>#<channel>" --add notifications.slack.rooms -r <accountName>/<repoName>
secure: "AMhxSZXy7kkjzd1+n0p+0uEvk0gEmEYJgIyUHEFH6z4sG9XbDa33/IrA7F6nenJ1us4zrXkSepOUc24dDCYYnAkHoxzTe0mOlNGMgK4TFLXxJD9jtzV5GG6PPaa8lWnWeNKLR1meRhSB3HBYDSpoSYwcCVxdPPA5fFBZ4CITyjL/TsEusUADUaHZrZhdyl3Xy6mpTM8ilens1FClh4W5xHDlI3tRVhx8QgFmm4CX9SRGS5ooZcavgFca5qvUhaXQPplDqyBXIwmMiZNaJf40IBSHUzSHkRV8SIkLijkmIrI7iRmpyhW5ZltKKYClqqhgzv/DsuDasWY62nKuOLKt+9ogMNACwsR6jtksTOQemo0mMKEoPgxuBO1vgMYCLiWxzrXeys1NAXnSOIQEoIg34ivClVyIqkPDe9OFaGHKaglhqTU5ppbBbHnavxEUMI1OFb98di0GOKqTu4oRQRfFUJMj5j82Ofs/V7oxrQe9BCs5OAQ9FOrnGwaoLUVBkkxWnU7IKnHw6uW4M/ZJ7GjpWMCBbQ1LAIlBXfoIgk/exLfAp8ZSWQNr8yCgvK/UYEqn4TgT8ZNRrJAUZzsfoXEJfufOwcQ476WwRQORjufTYiTD+BWfnAgmAChMskxQWOQzVhhWriRZATt6omeLWLGoLxT80LxrMm9KZ966kkh3XOM="
on_start: always
on_failure: always
on_success: always
on_cancel: always
on_error: always
on_pull_requests: always