forked from nervosnetwork/docs.nervos.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
28 lines (23 loc) · 805 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
os: linux
dist: bionic
language: node_js
node_js:
- lts/*
cache:
yarn: true
before_install:
- cd website
- node -v
- npm -v
- npm -g install now
- npm -g install yarn
- now -v
- yarn -v
install:
- yarn
script:
- yarn build
- if [ "$TRAVIS_BRANCH" = "develop" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then git config --global user.name "${GH_NAME}"; fi
- if [ "$TRAVIS_BRANCH" = "develop" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then git config --global user.email "${GH_EMAIL}"; fi
- if [ "$TRAVIS_BRANCH" = "develop" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc; fi
- if [ "$TRAVIS_BRANCH" = "develop" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then GIT_USER="${GH_NAME}" yarn run publish-gh-pages; fi