generated from canadian-coding/python-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added release, docs and testing pipelines
- Loading branch information
1 parent
a8dc27d
commit 91b4ed2
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build new docs | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
doc_system: | ||
description: Either pdoc, or mkdocs | ||
default: pdoc | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel | ||
python -m pip install . | ||
python -m pip install --upgrade pdoc3 | ||
python -m pip install --upgrade mkdocs | ||
# if doc_type is mkdocs | ||
- name: Deploy docs | ||
uses: mhausenblas/mkdocs-deploy-gh-pages@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ github.event.inputs.doc_system == 'mkdocs' }} | ||
|
||
# if doc_type is pdoc | ||
- name: Remove source files | ||
run: rm -rf * | ||
if: ${{ github.event.inputs.doc_system == 'pdoc' }} | ||
|
||
- name: build html files | ||
run: | | ||
python -m pdoc ahd --html --force | ||
cd html | ||
ls | ||
mv ahd/* . | ||
ls | ||
cd .. | ||
ls | ||
if: ${{ github.event.inputs.doc_system == 'pdoc' }} | ||
|
||
- name: Deploy Docs | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./html | ||
if: ${{ github.event.inputs.doc_system == 'pdoc' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: PYPI release | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel | ||
- name: Build distribution | ||
run: python3 setup.py sdist bdist_wheel | ||
|
||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
2 changes: 1 addition & 1 deletion
2
.github/workflows/pythonapp.yml → .github/workflows/testing.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Python application | ||
name: Testing | ||
|
||
on: | ||
push: | ||
|