Use cargo run for github pages instead of hard-coding the binary path

This commit is contained in:
Michael Bryan 2017-12-30 21:47:53 +08:00
parent d4a5176f26
commit 65900b87e6
No known key found for this signature in database
GPG key ID: E9C602B0D9A998DC

View file

@ -6,7 +6,8 @@ set -ex
# Only run this on the master branch for stable
if [ "$TRAVIS_PULL_REQUEST" != "false" ] ||
[ "$TRAVIS_BRANCH" != "master" ] ||
[ "$TRAVIS_RUST_VERSION" != "stable" ]; then
[ "$TRAVIS_RUST_VERSION" != "stable" ] ||
[ "$TARGET" != "x86_64-unknown-linux-gnu" ]; then
exit 0
fi
@ -23,7 +24,7 @@ echo -e "${CYAN}Running cargo doc${NC}"
cargo doc --features regenerate-css
echo -e "${CYAN}Running mdbook build${NC}"
target/"$TARGET"/debug/mdbook build book-example/
cargo run -- build book-example/
echo -e "${CYAN}Copying book to target/doc${NC}"
cp -R book-example/book/* target/doc/