diff --git a/.github/workflows/pytest-docs.yml b/.github/workflows/pytest-docs.yml index b033368b..e3af7774 100644 --- a/.github/workflows/pytest-docs.yml +++ b/.github/workflows/pytest-docs.yml @@ -1,7 +1,16 @@ name: Build Docs on: - [release, workflow_dispatch] + push: + branches: + - main + tags: + - "v*" + pull_request: + branches: + - main + release: + types: [published] jobs: build: @@ -33,8 +42,8 @@ jobs: run: | cd docs_rst make html - - name: Detect changes - if: ${{ !contains(github.ref, 'refs/heads/main') }} + - name: Detect changes on release + if: startsWith(github.head_ref, 'releases/') id: changes shell: bash run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31782afd..86743acb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,6 @@ jobs: run: pip install build - name: Publish package - if: contains(github.ref, 'refs/heads/main') uses: pypa/gh-action-pypi-publish@release/v1.5 with: user: __token__