From 693c2f50416bc63018e3b9a06894fa4ad4d3971b Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 20 Jul 2020 06:18:00 +0900 Subject: [PATCH] Tweak actions (#85) - Tweak trigger events - Remove unnecessary workaround (hopefully) - Stop using `ghq_import` --- .github/workflows/clippy.yml | 4 +++- .github/workflows/linux.yml | 9 +++++++-- .github/workflows/macos.yml | 9 +++++++-- .github/workflows/msrv.yml | 7 ++++++- .github/workflows/upload-doc.yml | 10 ++++++---- .github/workflows/windows.yml | 9 +++++++-- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index dbdddaad6..5f8e47891 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -1,4 +1,6 @@ -on: pull_request +on: + pull_request: + types: [opened, synchronize, reopened] name: Clippy Check jobs: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3562131f0..7ae3ac59b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,6 +1,11 @@ name: CI (Linux) -on: [push, pull_request] +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master jobs: build_and_test: @@ -76,5 +81,5 @@ jobs: - name: Clear the cargo caches run: | - which cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8295f20ae..9f20d205d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,6 +1,11 @@ name: CI (macOS) -on: [push, pull_request] +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master jobs: build_and_test: @@ -60,5 +65,5 @@ jobs: - name: Clear the cargo caches run: | - which cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 24e04f556..328ccacf3 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -1,6 +1,11 @@ name: CI (Linux, MSRV) -on: [push, pull_request] +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master jobs: build_and_test: diff --git a/.github/workflows/upload-doc.yml b/.github/workflows/upload-doc.yml index 4e0b7114a..38b3bfdc9 100644 --- a/.github/workflows/upload-doc.yml +++ b/.github/workflows/upload-doc.yml @@ -29,7 +29,9 @@ jobs: - name: Tweak HTML run: echo "" > target/doc/index.html - - name: Upload documentation - run: | - git clone https://github.com/davisp/ghp-import.git - ./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://${{ secrets.GITHUB_TOKEN }}@github.com/"${{ github.repository }}.git" target/doc + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@3.5.8 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: target/doc diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1dcd6f962..57dede744 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,6 +1,11 @@ name: CI (Windows) -on: [push, pull_request] +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master jobs: build_and_test: @@ -64,5 +69,5 @@ jobs: - name: Clear the cargo caches run: | - which cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache