Skip to content

Commit

Permalink
Added release, docs and testing pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
Descent098 committed Jun 6, 2022
1 parent a8dc27d commit 91b4ed2
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
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' }}
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
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 }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python application
name: Testing

on:
push:
Expand Down

0 comments on commit 91b4ed2

Please sign in to comment.