forked from xupsh/pp4fpgas-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·53 lines (46 loc) · 1.17 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
43
44
45
46
47
48
49
50
51
52
53
language: node_js
node_js:
- "10"
# 缓存依赖
cache:
directories:
- $HOME/.npm
before_install:
- export TZ='Asia/Shanghai' # 更改时区
- sudo apt-get -qq update
- sudo apt-get install -y calibre
# - sudo mv ebook-convert-wrapper /usr/local/bin/ebook-convert
# - which ebook-convert
# - echo $PATH
# - ls -la /usr/local/bin
# 依赖安装
install:
- npm install gitbook-cli -g
# 安装 gitbook 插件
- gitbook install
# 构建脚本
script:
# 自定义输出目录 gitbook build src dest
- gitbook build . ./build
# - gitbook pdf . ./build/pp4fpgas-cn.pdf
# - gitbook epub . ./build/pp4fpgas-cn.epub
# - gitbook mobi . ./build/pp4fpgas-cn.mobi
# 分支白名单
branches:
only:
- master # 只对 master 分支进行构建
# GitHub Pages 部署
deploy:
provider: pages
skip_cleanup: true
keep-history: false
# 在项目仪表盘的 Settings -> Environment Variables 中配置
github_token: $GITHUB_TOKEN
# 将 build 目录下的内容推送到默认的 gh-pages 分支上,并不会连带 build 目录一起
local_dir: build
fqdn: $CUSTOM_DOMAIN
name: $GIT_NAME
email: $GIT_EMAIL
verbose: true
on:
branch: master