From ee920b247ab9529a3ab0837700e0d99ee03042f1 Mon Sep 17 00:00:00 2001 From: Jeremy Asuncion Date: Wed, 29 Jun 2022 10:11:01 -0700 Subject: [PATCH] Fix deploy --- .github/workflows/deploy.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ebd98ade..2ca7ebc5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - 'v*' workflow_dispatch: concurrency: @@ -49,22 +51,22 @@ jobs: # Deploy the book's HTML to github pages - name: GitHub Pages action - if: github.repository == 'napari/napari-sphinx-theme' && github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.repository == 'napari/napari-sphinx-theme' && github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - + # If tagged version: Publish wheel to PyPI - name: Publish to PyPI - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - + # If tagged version: Update release on github repo - uses: softprops/action-gh-release@v1 - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && startsWith(github.ref, 'refs/tags') with: generate_release_notes: true