Skip to content

Update documentation to reflect new features #129

Update documentation to reflect new features

Update documentation to reflect new features #129

Workflow file for this run

name: Build and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Check formatting
run: poetry run black --check .
- name: Lint with Ruff
run: poetry run ruff check .
- name: Test with tox
run: poetry run tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
documentation:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install and Build
run: cd docs && yarn install && yarn docs:build
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/docs/.vuepress/dist
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@master
- run: git fetch --prune --unshallow
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 setuptools setuptools_scm
- name: Create Dist
run: python setup.py sdist
- uses: actions/upload-artifact@v2
with:
name: release
path: dist
if-no-files-found: error
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
deploy:
runs-on: ubuntu-latest
needs: release
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: release
path: dist/
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_token }}