Skip to content

Merge pull request #122 from ImogenBits/util_scripts #1

Merge pull request #122 from ImogenBits/util_scripts

Merge pull request #122 from ImogenBits/util_scripts #1

Workflow file for this run

name: Release
on:
push:
tags:
- v*.*.*
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
- name: Publish package distributions to PyPI
run: pdm publish
release:
name: Create Github release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material pymdown-extensions mkdocstrings[python] mdx_include
- name: Build docs
run: mkdocs build -d ./site
- name: zip docs
run: zip -r docs.zip ./site
- name: tar docs
run: tar czf docs.tar.gz -C ./site .
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
docs.zip
docs.tar.gz
deploy-docs:
name: Deploy docs to github pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material pymdown-extensions mkdocstrings[python] mdx_include
- run: mkdocs gh-deploy --force