diff --git a/.travis.yml b/.travis.yml index 56626f75ced..c3c00aa82a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,8 @@ before_install: - git submodule update --init --recursive script: - - cargo build --color always --all --all-targets - cargo test --color always --all + - cargo doc --color always after_success: # Temporarily disabled because cargo tarpaulin does not set CARGO_MANIFEST_DIR. @@ -33,9 +33,21 @@ after_success: # - | # cargo tarpaulin --all --ignore-tests --out Xml && # bash <(curl -s https://codecov.io/bash) -- '[ $TRAVIS_PULL_REQUEST = false ] && - [ "$TRAVIS_BRANCH" == "master" ] && - ./.travis/docs.sh' +# - '[ $TRAVIS_PULL_REQUEST = false ] && +# [ "$TRAVIS_BRANCH" == "master" ] && +# ./.travis/docs.sh' +deploy: + local_dir: $CARGO_TARGET_DIR/doc + repo: swc-project/swc + target_branch: gh-pages + provider: pages + skip_cleanup: true + github_token: $GH_TOKEN + email: kdy1@outlook.kr + name: "강동윤" + on: + branch: master + notifications: email: never env: diff --git a/.travis/docs.sh b/.travis/docs.sh deleted file mode 100755 index a0f8e7dbf00..00000000000 --- a/.travis/docs.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copied from https://github.com/hyperium/hyper/blob/master/.travis/docs.sh -# which is MIT-licensed. - -set -o errexit - -shopt -s globstar - -cargo doc - -git clone --branch gh-pages "https://$GH_TOKEN@github.com/${TRAVIS_REPO_SLUG}.git" deploy_docs > /dev/null 2>&1 -cd deploy_docs - - -git config user.name "강동윤" -git config user.email "kdy1@outlook.kr" - -if [ "$TRAVIS_TAG" = "" ]; then - rm -rf master - mv ../target/doc ./master - echo "" > ./master/index.html -fi - - -git add -A . > /dev/null 2>&1 -git commit -q -m "rebuild pages at ${TRAVIS_COMMIT}" - -echo -echo "Pushing docs..." -git push --quiet origin gh-pages > /dev/null 2>&1 -echo -echo "Docs published." -echo \ No newline at end of file