diff --git a/.github/workflows/sphinx.yaml b/.github/workflows/sphinx.yaml index 0d498a87..c5f16946 100644 --- a/.github/workflows/sphinx.yaml +++ b/.github/workflows/sphinx.yaml @@ -1,6 +1,12 @@ name: "Sphinx: Render docs" -on: push +on: + push: + branches: [main] + pull_request: + branches: [main] + release: + types: [published] # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -44,6 +50,8 @@ jobs: deploy: # Deploy to the github-pages environment + # but not on PRs + if: ${{ github.event_name != 'pull_request' }} environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}