-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (37 loc) · 891 Bytes
/
.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
language: node_js
node_js:
- '7.4.0'
# fail asap when there is a failure
matrix:
fast_finish: true
# cache node modules
cache:
yarn: true
directories:
- node_modules
script:
- npm run build
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
after_success: |
if [ -n "$GITHUB_API_KEY" ]; then
if ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) &&
[ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "Deploying"
cd "$TRAVIS_BUILD_DIR"
cd dist
git init
git add .
git -c user.name=$GITHUB_NAME -c user.email=$GITHUB_EMAIL commit -m "Auto Deployment"
git push -f -q https://$GITHUB_NAME:[email protected]/soussunefm/soussunefm.github.io master
cd "$TRAVIS_BUILD_DIR"
else
echo "Not Deploying"
fi
fi