diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..47d51ecf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + test: + name: build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install mdbook + run: | + tag=$(curl -LsSf https://api.github.com/repos/rust-lang/mdBook/releases/latest | jq -r '.tag_name') + curl -LsSf https://github.com/rust-lang/mdBook/releases/download/$tag/mdbook-$tag-x86_64-unknown-linux-gnu.tar.gz | tar xzf - + echo $(pwd) >> $GITHUB_PATH + - run: mdbook build && mdbook test + - uses: rust-lang/simpleinfra/github-actions/static-websites@master + with: + deploy_dir: book + github_token: ${{ secrets.GITHUB_TOKEN }} + if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 99422b14..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: rust -sudo: false - -cache: - - cargo - -env: - RUSTINFRA_DEPLOY_DIR: book -import: - - rust-lang/simpleinfra:travis-configs/static-websites.yml - -rust: - - stable - -before_script: - - cargo install --vers "^0.4.5" mdbook - -script: - - mdbook build && mdbook test