-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (46 loc) · 1.08 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
language: node_js
sudo: required
dist: trusty
# Blocklist
branches:
except:
- gh-pages # will be deployed to, no need to build it
cache:
directories:
- node_modules
stages:
- release
- deploy
jobs:
include:
# Job: Release
- stage: release
if: branch = master
node_js:
- 'lts/*'
- '8'
- '10'
skip_cleanup: true
script:
- npx semantic-release
# Job: Page
- stage: deploy
if: branch = master
node_js:
- 'lts/*'
- '8'
- '10'
script:
- git fetch --tags
- version=$(git describe --tags `git rev-list --tags --max-count=1`)
- echo "Documentation version ${version}"
- git checkout refs/tags/${version}
- chmod +x ./styleguide/prepare.sh
- ./styleguide/prepare.sh
- npm run styleguide:build
deploy:
- provider: pages
skip_cleanup: true
github_token: $GH_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
local_dir: public/