diff --git a/.github/workflows/build-sphinx.yml b/.github/workflows/build-sphinx.yml index 2258287ac0fc..d9e6bad9965f 100644 --- a/.github/workflows/build-sphinx.yml +++ b/.github/workflows/build-sphinx.yml @@ -29,6 +29,12 @@ jobs: with: access_token: ${{ github.token }} + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "$GITHUB_CONTEXT" + - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main with: @@ -115,7 +121,7 @@ jobs: # https://github.com/marketplace/actions/github-pages-action - name: Deploy docs if: | - !github.event.pull_request.head.repo.fork && + github.event.pull_request && !github.event.pull_request.head.repo.fork && (github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')) uses: peaceiris/actions-gh-pages@v3.9.3 with: @@ -124,7 +130,7 @@ jobs: - name: Publish pull-request docs if: | - !github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed' + github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' uses: peaceiris/actions-gh-pages@v3.9.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -139,7 +145,7 @@ jobs: - name: Comment with URL to published pull-request docs if: | - !github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed' + github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action != 'closed' env: PR_NUM: ${{ github.event.number }} uses: mshick/add-pr-comment@v2.8.1 @@ -150,7 +156,7 @@ jobs: clean: if: | - !github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action == 'closed' + github.event.pull_request && !github.event.pull_request.head.repo.fork && github.event.action == 'closed' needs: build-and-deploy