forked from swagger-api/swagger-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (55 loc) · 1.52 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
language: node_js
cache:
directories:
- node_modules
node_js:
- '6.9'
services:
- docker
install: "npm i && npm update"
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
env:
- DOCKER_IMAGE_NAME=swaggerapi/swagger-editor
script:
- npm test
deploy:
- provider: npm
email: [email protected]
skip_cleanup: true
api_key:
secure: "Fh8+qozAjs8YxWYntPN/xO3UNpQ+avEzOz4ULzn5lEXbcQgV/v1/e6ABk06HZ9Go9rigYpR2LnxLfP7Tp6ZC4dFE9GR0ota5rkrXlCJi6QktDccyKEvai2cayDW/3nFv4A7yM1xWgTMlQP5cVfZVEWopscWKCIdnZ9QvhTW0TKY="
on:
tags: true
repo: swagger-api/swagger-editor
node: '6.9'
- provider: script
skip_cleanup: true
script: swagger-editor-dist-package/deploy.sh
on:
tags: true
repo: swagger-api/swagger-editor
node: '6.9'
- provider: script
skip_cleanup: true
script: "sh build-tools/deploy-docker-hub-tag.sh"
on:
tags: true
repo: swagger-api/swagger-editor
node: '6.9'
after_success:
# artifacts from this `npm run build` are used in the deploy step as well
- |
if [ $TRAVIS_PULL_REQUEST == "false" ]; then
npm run build
if [ $DOCKER_HUB_USERNAME ]; then
docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD;
DOCKER_IMAGE_TAG=unstable;
docker build -t $DOCKER_IMAGE_NAME .;
docker tag $DOCKER_IMAGE_NAME $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG;
docker push $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG;
fi;
fi;
- ./node_modules/.bin/bundlesize