Skip to content

Commit 51ffbf6

Browse files
committed
Update publish github action
1 parent c718b0d commit 51ffbf6

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
name: Upload Python Package
22

33
on:
4+
workflow_dispatch:
45
release:
56
types: [created]
67

78
jobs:
89
deploy:
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1213

1314
- name: Set up Python
14-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1516
with:
1617
python-version: '3.x'
1718

@@ -26,17 +27,11 @@ jobs:
2627
pip install .
2728
pytest
2829
29-
- name: Build and publish
30-
env:
31-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
32-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30+
- name: Build
3331
run: |
3432
python setup.py sdist bdist_wheel
35-
twine upload dist/*
3633
37-
- name: Deploy mkdocs site
38-
run: |
39-
pip install mkdocs-material
40-
pip install mkdocs-git-authors-plugin
41-
pip install mkdocs-git-revision-date-localized-plugin
42-
mkdocs gh-deploy --force
34+
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ We use google-style docstrings.
3434

3535
## Documentation
3636

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

3939
```bash
40-
mkdocs gh-deploy
40+
mkdocs gh-deploy --force
4141
```

0 commit comments

Comments
 (0)