Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
3cba54ae
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3cba54ae
编写于
3月 06, 2018
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused document deployment function in build_doc.sh
上级
f5ebd1a5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
75 deletion
+1
-75
paddle/scripts/travis/build_doc.sh
paddle/scripts/travis/build_doc.sh
+1
-75
未找到文件。
paddle/scripts/travis/build_doc.sh
浏览文件 @
3cba54ae
...
...
@@ -14,78 +14,4 @@ make -j `nproc` paddle_docs paddle_docs_cn paddle_api_docs
# check websites for broken links
linkchecker doc/v2/en/html/index.html
linkchecker doc/v2/cn/html/index.html
linkchecker doc/api/en/html/index.html
# Parse Github URL
REPO
=
`
git config remote.origin.url
`
SSH_REPO
=
${
REPO
/https
:
\/\/github.com\//git@github.com
:
}
SHA
=
`
git rev-parse
--verify
HEAD
`
# Documentation branch name
# gh-pages branch is used for PaddlePaddle.org. The English version of
# documentation in `doc` directory, and the chinese version in `doc_cn`
# directory.
TARGET_BRANCH
=
"gh-pages"
# Only deploy master branch to build latest documentation.
SOURCE_BRANCH
=
"master"
# Clone the repo to output directory
mkdir
output
git clone
$REPO
output
cd
output
function
deploy_docs
()
{
SOURCE_BRANCH
=
$1
DIR
=
$2
# If is not a Github pull request
if
[
"
$TRAVIS_PULL_REQUEST
"
!=
"false"
]
;
then
exit
0
fi
# If it is not watched branch.
if
[
"
$TRAVIS_BRANCH
"
!=
"
$SOURCE_BRANCH
"
]
;
then
return
fi
# checkout github page branch
git checkout
$TARGET_BRANCH
||
git checkout
--orphan
$TARGET_BRANCH
mkdir
-p
${
DIR
}
# remove old docs. mv new docs.
set
+e
rm
-rf
${
DIR
}
/doc
${
DIR
}
/doc_cn
${
DIR
}
/api_doc
set
-e
cp
-r
../doc/v2/cn/html
${
DIR
}
/doc_cn
cp
-r
../doc/v2/en/html
${
DIR
}
/doc
cp
-r
../doc/api/en/html
${
DIR
}
/api_doc
git add
.
}
deploy_docs
"master"
"."
deploy_docs
"develop"
"./develop/"
# Check is there anything changed.
set
+e
git diff
--cached
--exit-code
>
/dev/null
if
[
$?
-eq
0
]
;
then
echo
"No changes to the output on this push; exiting."
exit
0
fi
set
-e
if
[
-n
$SSL_KEY
]
;
then
# Only push updated docs for github.com/PaddlePaddle/Paddle.
# Commit
git add
.
git config user.name
"Travis CI"
git config user.email
"paddle-dev@baidu.com"
git commit
-m
"Deploy to GitHub Pages:
${
SHA
}
"
# Set ssh private key
openssl aes-256-cbc
-K
$SSL_KEY
-iv
$SSL_IV
-in
../../paddle/scripts/travis/deploy_key.enc
-out
deploy_key
-d
chmod
600 deploy_key
eval
`
ssh-agent
-s
`
ssh-add deploy_key
# Push
git push
$SSH_REPO
$TARGET_BRANCH
fi
linkchecker doc/v2/api/en/html/index.html
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录