-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (33 loc) · 973 Bytes
/
.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
language: node_js
node_js:
- "14"
branches:
except:
- gh-pages
notifications:
email: false
script:
- yarn run lint
- yarn run build
# https://docs.travis-ci.com/user/deployment/pages/
before_deploy:
- export DISTDIR=/tmp/dist
- git fetch origin gh-pages:gh-pages
- git worktree add ${DISTDIR} gh-pages
- cp ./build-web/iottalkjs-web.js ${DISTDIR}/iottalkjs.js
- cp ./build-web/iottalkjs-web.js ${DISTDIR}/iottalkjs-${TRAVIS_COMMIT}.js
- echo "TRAVIS_TAG = ${TRAVIS_TAG}"
- echo "TRAVIS_BRANCH = ${TRAVIS_BRANCH}"
- if [ "${TRAVIS_TAG}" ]; then
echo 'Add tags build';
cp ./build-web/iottalkjs-web.js ${DISTDIR}/iottalkjs-${TRAVIS_TAG}.js;
fi
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
local_dir: /tmp/dist
on:
all_branches: true
condition: $TRAVIS_BRANCH == "master" || -n $TRAVIS_TAG