From 4c6b47b5fa3f985c52fa93285620281dbbcbfaa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Wed, 23 Oct 2024 15:54:52 -0700 Subject: [PATCH] CI: move publish conditional from jobs to step level --- .github/workflows/ci_publish.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_publish.yml b/.github/workflows/ci_publish.yml index f66f2101..67f0739f 100644 --- a/.github/workflows/ci_publish.yml +++ b/.github/workflows/ci_publish.yml @@ -1,4 +1,4 @@ -name: Publish HTML +name: Build and Publish HTML on: push: @@ -32,16 +32,11 @@ jobs: - name: Install dependencies run: python -m pip install --upgrade tox - - name: Execute notebooks as testing + - name: Build HTML with executing notebooks run: tox -e py311-buildhtml - publish: - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - name: Publish HTML - needs: build_docs - runs-on: ubuntu-latest - steps: - - name: Publish + - name: Publish HTML when on main + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }}