From 4d55f665aaec969caab15ec70fcb92e3aed4657c Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Fri, 19 Mar 2021 01:25:15 +0100 Subject: [PATCH] PRs can't publish the docs --- .github/workflows/ci.yml | 14 ++++++-------- .github/workflows/docs.yml | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f59a6b7..f5634ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: build: @@ -8,15 +12,9 @@ jobs: steps: - uses: actions/checkout@master + - name: Build run: cargo build --verbose - name: Run tests run: cargo test --verbose - - name: Build Documentation - run: cargo doc --no-deps - - name: Deploy Docs - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./target/doc diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..479899e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,21 @@ +name: Docs + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Build Documentation + run: cargo doc --no-deps + - name: Deploy Docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc