Skip to content

Commit 446e3c2

Browse files
authored
Merge pull request #946 from luotao1/checker
travis for check broken links
2 parents 4e34220 + 39a5477 commit 446e3c2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ before_install:
5656
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
5757
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
5858
- if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
59-
- pip install wheel protobuf sphinx recommonmark virtualenv numpy sphinx_rtd_theme pre-commit
59+
- pip install wheel protobuf sphinx recommonmark virtualenv numpy sphinx_rtd_theme pre-commit requests==2.9.2 LinkChecker
6060
script:
6161
- paddle/scripts/travis/main.sh
6262
notifications:

paddle/scripts/travis/docs.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ source ./common.sh
77
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_GPU=OFF -DWITH_DOC=ON
88
make paddle_docs paddle_docs_cn
99

10+
# check websites for broken links
11+
linkchecker doc/en/html/index.html
12+
linkchecker doc/cn/html/index.html
13+
1014
# Parse Github URL
1115
REPO=`git config remote.origin.url`
1216
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
@@ -35,8 +39,8 @@ git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
3539

3640
# remove old docs. mv new docs.
3741
rm -rf doc doc_cn
38-
mv ../doc_cn/html doc_cn
39-
mv ../doc/html doc
42+
mv ../doc/cn/html doc_cn
43+
mv ../doc/en/html doc
4044

4145
# Check is there anything changed.
4246
set +e

0 commit comments

Comments
 (0)