language: rust
env:
global:
- CARGO_UPLOAD_FIRST_TIME=true
- PAGES_BRANCH_NAME=gh-pages
- UPDATE_PAGES=false
install:
- rustc -V
- cargo -V
script:
cargo build && cargo test
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo "Skip deploy on pull request"
exit 0
fi
# Success
curl -sSL https://raw.githubusercontent.com/DoumanAsh/douman-ci/master/rust/upload_pages.sh > ~/upload_pages.sh
curl -sSL https://raw.githubusercontent.com/DoumanAsh/douman-ci/master/rust/upload_rust_crate.sh > ~/upload_rust_crate.sh
source ~/upload_rust_crate.sh
bash ~/upload_pages.sh