forked from baomidou/mybatis-plus-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (32 loc) · 1.04 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
language: node_js
sudo: false
node_js:
- "8"
cache:
yarn: true
directories:
- node_modules
branches:
only:
- master
env:
global:
- GITHUB_REPO: github.com/baomidou/mybatis-plus-doc.git
- CODING_REPO: git.coding.net/yangyang0507/mybatis-plus-doc.git
- GITEE_REPO: gitee.com/baomidou/mybatis-plus-doc.git
before_install:
- export TZ=Asia/Shanghai
script:
- yarn run build
after_success:
- git config user.name "D.Yang"
- git config user.email "koyangslash@gmail.com"
- git push --force --quiet "https://devyang:${CI_TOKEN_GITEE}@${GITEE_REPO}" master:master
- git clone https://${CODING_REPO} ./old-docs
- cp -r ./old-docs/.git ./docs
- cd ./docs
- git add -A
- git commit -m "deploy at `date +\"%Y-%m-%d %H:%M:%S\"`"
- git push --force --quiet "https://yangyang0507:${CI_TOKEN}@${GITHUB_REPO}" master:gh-pages
- git push --force --quiet "https://yangyang0507:${CI_TOKEN_CODING}@${CODING_REPO}" master:master
- git push --force --quiet "https://devyang:${CI_TOKEN_GITEE}@${GITEE_REPO}" master:gh-pages