Skip to content

Commit

Permalink
Update publish github action
Browse files Browse the repository at this point in the history
  • Loading branch information
timvink committed Jun 9, 2023
1 parent c718b0d commit 51ffbf6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Upload Python Package

on:
workflow_dispatch:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

Expand All @@ -26,17 +27,11 @@ jobs:
pip install .
pytest
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Deploy mkdocs site
run: |
pip install mkdocs-material
pip install mkdocs-git-authors-plugin
pip install mkdocs-git-revision-date-localized-plugin
mkdocs gh-deploy --force
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ We use google-style docstrings.

## Documentation

Every release the docs are re-built by github actions. To deploy manually:
They need to be deployed manually:

```bash
mkdocs gh-deploy
mkdocs gh-deploy --force
```

0 comments on commit 51ffbf6

Please sign in to comment.