diff --git a/.deploy.sh b/.deploy.sh deleted file mode 100644 index 562e6cf..0000000 --- a/.deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then - cp CNAME public - git clone https://github.com/davisp/ghp-import.git && - ./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -b master -r https://"$GH_TOKEN"@github.com/actix/actix.github.io.git public && - echo "Uploaded documentation" -fi diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..dcb073b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Build and Deploy +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + if: github.repository == 'actix/actix-website' + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false # This is needed to deploy on checkout@v2 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.74.2' + + - name: Build + run: hugo --minify + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@3.5.8 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BRANCH: master + FOLDER: public + REPOSITORY_NAME: actix/actix.github.io diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..df53b3a --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,33 @@ +name: Check examples + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master + +env: + RUSTFLAGS: -A dead-code -A unused-variables + +jobs: + check-examples: + strategy: + fail-fast: false + + name: Check examples + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Use stable + run: | + rustup override set stable + rustup update stable + + - name: cargo check and cargo test + run: | + cd examples + cargo check + cargo test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2f621cb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -sudo: false - -env: - global: - - OPENSSL_VERSION=openssl-1.0.2 - -before_install: - - sudo add-apt-repository -y ppa:0k53d-karl-f830m/openssl - # - sudo apt-get update -qq - - sudo apt-get install -qq libssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev - -cache: - directories: - - $HOME/cargo - - $TRAVIS_BUILD_DIR/examples/target - -install: - - curl -L https://github.com/gohugoio/hugo/releases/download/v0.62.1/hugo_0.62.1_Linux-64bit.tar.gz | tar xzvf - - -matrix: - include: - - env: - - TASK=build - script: ./hugo - - env: - - TASK=check - - RUSTFLAGS="-A dead-code -A unused-variables" - language: rust - script: cd examples; cargo check; cargo test - -deploy: - provider: script - script: bash .deploy.sh - skip_cleanup: true - on: - branch: master - condition: $TRAVIS_PULL_REQUEST = "false" && $TASK = "build"