-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.41 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Docs
on:
release:
types: [created]
workflow_call:
workflow_dispatch: # run manually from actions tab
# Set permissions at the job level.
permissions: {}
env:
PYTHONUNBUFFERED: 1
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # fetch all commits and branches
- name: Set up Python 3.13
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.13'
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.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=requirements/ci
- 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