0.4.0 #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs | |
on: | |
release: | |
types: [created] | |
workflow_call: | |
# run manually from actions tab | |
workflow_dispatch: | |
env: | |
PYTHONUNBUFFERED: 1 | |
permissions: | |
contents: read | |
jobs: | |
docs: | |
# Disables this workflow from running in a repository that is not part of the indicated organization/user | |
if: github.repository_owner == 'afuetterer' | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 0 # fetch all commits and branches | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: '3.12' | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
key: docs-${{ hashFiles('pyproject.toml') }} | |
path: ~/.cache/pip | |
- name: Install pre-requisites (e.g. hatch) | |
run: python -m pip install --require-hashes --requirement=.github/requirements/ci.txt | |
- run: hatch run docs:cli | |
- run: hatch run docs:build | |
if: github.event_name == 'pull_request' | |
- run: | | |
hatch version | |
hatch run docs:deploy | |
if: contains(fromJSON('["release", "workflow_dispatch"]'), github.event_name) | |
env: | |
GIT_COMMITTER_NAME: github-actions[bot] | |
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com |