-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
79 lines (69 loc) · 2.01 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: node_js
node_js:
- '10'
env:
global:
- GIT_NAME=ange007
- EMAIL=2736539+ange007@users.noreply.github.com
- REPO_URL=https://${OAuth}@github.com/${TRAVIS_REPO_SLUG}.git
# @todo: Попробовать реализовать скриншот демо страницы:
# https://github.com/GregM/xvfb-screenshots/blob/master/README.md
# https://atasteofsandwich.wordpress.com/2014/05/04/visual-regression-tests-with-travis-ci-and-github/
#
#before_install:
# - export CHROME_BIN=chromium-browser
# - export DISPLAY=:99.0
# - sh -e /etc/init.d/xvfb start
before_script:
- >
if [[ "${TRAVIS_BRANCH}" == "dev" ]] || [[ "${TRAVIS_BRANCH}" == "master" ]]; then
npm install -g gulp && gulp clean && gulp build && gulp build:min
fi
script:
- git config --global user.name "${GIT_NAME}"
- git config --global user.email "${GIT_EMAIL}"
- >
if [[ "${TRAVIS_BRANCH}" == "master" ]]; then
# - chmod +x ${TRAVIS_BUILD_DIR}/.travis-ghpages-commit.sh
${TRAVIS_BUILD_DIR}/.travis-ghpages-commit.sh
fi
- >
if [[ "${TRAVIS_BRANCH}" == "master" ]]; then
# - chmod +x ${TRAVIS_BUILD_DIR}/.travis-release-commit.sh
${TRAVIS_BUILD_DIR}/.travis-release-commit.sh
fi
- >
if [[ "${TRAVIS_BRANCH}" == "release" ]]; then
cd ${TRAVIS_BUILD_DIR}
fi
deploy:
- provider: releases
api_key: ${OAuth}
file:
- ${TRAVIS_BUILD_DIR}/jquery.formStylerModern.js
- ${TRAVIS_BUILD_DIR}/jquery.formStylerModern.css
- ${TRAVIS_BUILD_DIR}/jquery.formStylerModern.min.js
- ${TRAVIS_BUILD_DIR}/jquery.formStylerModern.min.css
skip_cleanup: true
on:
repo: ange007/JQueryFormStyler-Modern
branch: release
tags: true
- provider: npm
email: ${EMAIL}
api_key: ${NPM_TOKEN}
skip_cleanup: true
tag: next
on:
branch: release
tags: true
sudo: false
dist: trusty
cache:
directories:
- node_modules
#addons:
# firefox: latest
# apt:
# packages:
# - google-chrome-stable