0.21.3 #49
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: | |
concurrency: | |
group: docs-${{ github.head_ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
docs: | |
# do not run in forks | |
if: github.repository == 'afuetterer/services-test4' | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 # fetch all commits and branches | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: "3.11" | |
- 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 version | |
- name: Build documentation | |
run: hatch run docs:build | |
if: github.event_name == 'pull_request' | |
- name: Deploy documentation | |
run: 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 |