Skip to content

Commit

Permalink
Fix deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey800 committed Jun 29, 2022
1 parent 6904ba6 commit ee920b2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -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

0 comments on commit ee920b2

Please sign in to comment.