-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
30 lines (30 loc) · 1.34 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
sudo: required
dist: trusty
language: node_js
node_js:
- 9
install:
- npm install
script:
- npm run build
after_success: |
if [ -n "$GITHUB_API_KEY" ]; then
git clone https://github.com/systelab/systelab.github.io.git
rm -rf ./systelab.github.io/allure-reporter-test/*
cp -r ./dist/* ./systelab.github.io/allure-reporter-test
sed -i -e "s~base href=\"/\"~base href=\"/allure-reporter-test/\"~g" ./systelab.github.io/allure-reporter-test/index.html
cd systelab.github.io
git add .
git -c user.name='travis' -c user.email='travis' commit -m 'New deploy in test from Travis'
git push -f -q https://systelab:$GITHUB_API_KEY@github.com/systelab/systelab.github.io
fi
if [ -n "$GITHUB_API_KEY" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
git clone https://github.com/systelab/systelab.github.io.git
rm -rf ./systelab.github.io/allure-reporter/*
cp -r ./dist/* ./systelab.github.io/allure-reporter
sed -i -e "s~base href=\"/\"~base href=\"/allure-reporter/\"~g" ./systelab.github.io/allure-reporter/index.html
cd systelab.github.io
git add .
git -c user.name='travis' -c user.email='travis' commit -m 'New deploy in production from Travis'
git push -f -q https://systelab:$GITHUB_API_KEY@github.com/systelab/systelab.github.io
fi