Skip to content

Merge pull request #6 from lachlan-ibm/development #8

Merge pull request #6 from lachlan-ibm/development

Merge pull request #6 from lachlan-ibm/development #8

Workflow file for this run

name: deploy-gh-pages
# Only run this when the master branch changes
on:
push:
branches:
- stable
# This job installs dependencies, builds the project's doc, and pushes it to `gh-pages`
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install dependencies
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
- name: Build the project
run: |
sphinx-build docs html
#TODO build and push to pypi
python -m build
- name: Publish python module
run: |
python -m build
twine upload --verbose dist/* -u $PYPI_API_USER -p $PYPI_API_KEY
if: github.ref == 'refs/head/stable'
# Push the HTML to github-pages
- name: Publish generated GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: html/
force_orphan: true