-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
56 lines (51 loc) · 1.32 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
language: node_js
node_js:
- '10'
- '12'
- '14'
- 'node'
# Trigger a push build on latest. PRs build on every branches.
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- latest
script:
- npm run test-ci
jobs:
include:
- stage: lint
node_js: lts/*
script:
- npm run lint
- stage: docs-lint
node_js: lts/*
script:
- npm run textlint
# Define the documentation site update stage
- stage: page
node_js: lts/*
script:
- git config --global user.name "${GH_NAME}"
- git config --global user.email "${GH_EMAIL}"
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
- cd website && npm install && GIT_USER="${GH_NAME}" npm run publish-gh-pages
# Define the release stage that runs semantic-release
- stage: release
node_js: lts/*
# Advanced: overwriting default `script` step to skip the tests
script: skip
deploy:
provider: script
skip_cleanup: true
on:
branch: latest
script:
- npx semantic-release
stages:
- test
- lint
- docs-lint
- name: page
if: branch = latest AND type != pull_request
- name: release
if: branch = latest AND type != pull_request