forked from baomidou/mybatis-plus-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (33 loc) · 1.03 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
sudo: false
node_js:
- "14"
cache:
yarn: true
directories:
- node_modules
branches:
only:
- master
env:
global:
- GITHUB_REPO: github.com/baomidou/mybatis-plus-doc.git
- CODING_REPO: e.coding.net/yangyang0507/mybatis-plus-doc.git
- GITEE_REPO: gitee.com/baomidou/mybatis-plus-doc.git
before_install:
- export TZ=Asia/Shanghai
install:
- yarn
script:
- yarn run build
after_success:
- git config user.name "D.Yang"
- git config user.email "koyangslash@gmail.com"
- git clone https://${CI_USERNAME_CODING}:${CI_TOKEN_CODING}@${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://${CI_USERNAME}:${CI_TOKEN}@${GITHUB_REPO}" master:gh-pages
- git push --force --quiet "https://${CI_USERNAME_CODING}:${CI_TOKEN_CODING}@${CODING_REPO}" master:master
- git push --force --quiet "https://${CI_USERNAME_GITEE}:${CI_TOKEN_GITEE}@${GITEE_REPO}" master:gh-pages