Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (47 sloc) 1.29 KB
language: node_js
node_js:
- "v11.14.0"
branches:
only:
- master
notifications:
email:
recipients:
- 1581532052@qq.com
- hanyajun5876@163.com
on_success: always # default: change
on_failure: always # default: alway
cache:
directories:
- node_modules
yarn: true
before_install:
- export TZ='Asia/Shanghai' # 设置时区
install:
- npm install -g gitbook-cli
script:
- gitbook build
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: ./_book/ ## 根据情况自定义到静态文件输出目录
target-branch: gh-pages
verbose: true
on:
branch: master
after_script:
- cd ./_book
- git init
- git config user.name "hanyajun0123"
- git config user.email "1581532052@qq.com"
- git add .
- git commit -m "Update Gitbook By TravisCI With Build $TRAVIS_BUILD_NUMBER"
- git push --force --quiet "https://hanyajun0123:${CODING_TOKEN}@${CO_REF}" master:master
- git tag v0.0.$TRAVIS_BUILD_NUMBER -a -m "Auto Taged By TravisCI With Build $TRAVIS_BUILD_NUMBER"
- git push --quiet "https://hanyajun0123:${CODING_TOKEN}@${CO_REF}" master:master --tags
# git@git.dev.tencent.com:hanyajun0123/coding_basis_review.git
env:
global:
# Coding Pages
- CO_REF: git.dev.tencent.com/hanyajun0123/coding_basis_review.git
You can’t perform that action at this time.