Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
timvink committed Jun 12, 2023
1 parent 5bd035d commit 0b44625
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
name: Upload Python Package

on:
workflow_dispatch:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
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'
- name: Install dependencies
Expand All @@ -22,14 +26,10 @@ jobs:
pip install -r tests/test_requirements.txt
pip install .
pytest
- name: Build package & publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build package
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Deploy mkdocs site
run: |
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

2 changes: 2 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ Is in `docs/`. To [deploy the docs](https://www.mkdocs.org/user-guide/deploying-
```bash
mkdocs gh-deploy
```

Note: there is no automated github action for this currently.

0 comments on commit 0b44625

Please sign in to comment.