Skip to content

v0.7.2

v0.7.2 #16

Workflow file for this run

name: Publish
on:
release:
types: [released]
jobs:
build-docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: "**/pyproject.toml"
- name: Install Uqbar
run: pip install -e .[docs]
- name: Install graphviz
run: sudo apt-get install --yes graphviz
- name: Build docs
run: make docs
- uses: actions/upload-artifact@v4
with:
name: docs
path: ./docs/build/html/
build-dist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- name: Build universal wheel
run: pipx run build --wheel
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
upload-to-pypi:
name: Publish release to PyPI
needs: [build-docs, build-dist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
update-gh-pages:
name: Update gh-pages
needs: [upload-to-pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: docs
path: docs
- name: Clone gh-pages
uses: actions/checkout@v4
with:
path: gh-pages
ref: gh-pages
- name: Rsync docs
run: rsync -rtv --del --exclude=.git docs/ gh-pages/
- name: Touch .nojekyll
run: touch gh-pages/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
allow_empty_commit: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: gh-pages
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com