-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
42 lines (42 loc) · 1.51 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
language: node_js
node_js:
- '0.10'
notifications:
email: false
slack:
rooms:
- amber-storm:S9TLKv9RGbsA2nTeZx6rJzJE#notifications
before_install:
- npm update -g npm
before_script:
- ./node_modules/.bin/bower install -F
after_success:
- test $TRAVIS_PULL_REQUEST = false
&& echo -e "Host *.cloudapp.net\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
&& openssl aes-256-cbc -K $encrypted_1d50cdfa274b_key -iv $encrypted_1d50cdfa274b_iv -in .travis/k.key.enc -out .travis/k.key -d
&& chmod 600 .travis/k.key
&& eval $(ssh-agent)
&& ssh-add .travis/k.key
- test $TRAVIS_BRANCH == "develop"
&& test $TRAVIS_PULL_REQUEST = false
&& git remote add deploy-server [email protected]:/home/git/regexpress.git
&& git push --force deploy-server $TRAVIS_BRANCH:$TRAVIS_BRANCH
- test $TRAVIS_BRANCH != "develop"
&& ./node_modules/.bin/bower install
&& gulp build:dist
&& cd dist
&& npm install --prod --ignore-scripts
&& cd $TRAVIS_BUILD_DIR
&& tar -zcvf regexpress-$TRAVIS_BRANCH.tar.gz dist && export PRODBUILDCOMPLETE=true
deploy:
provider: releases
api_key:
secure: XTUX4TwgJfSFzGm46g8cDQbVBCaAIP7IVjKD5tquXvYfQaNLkUvEM3t1mjqXXADYHKWpDMj117meyVD8EJhilUOKCHnJq/9XCWhhbTXzDaTR/xl45/4CIb+GAKe4ZKv5JW4xpmjsc1o1AtyjwUHXGw2VUMlAo3FKv913267ZsSM=
file: regexpress-$TRAVIS_BRANCH.tar.gz
on:
condition: $PRODBUILDCOMPLETE = true
repo: RegExpress/regexpress
all_branches: true
tags: true
after_deploy:
- ssh [email protected] "./deploy.sh $TRAVIS_BRANCH"