-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.18 KB
/
main_docs.yml
File metadata and controls
46 lines (39 loc) · 1.18 KB
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
46
name: Build docs
on:
push:
branches:
- main
workflow_dispatch:
inputs:
code_branch_tag:
description: "The branch or tag to run the workflow from"
required: true
default: "main"
jobs:
# Build the documentation and upload the static HTML files as an artifact.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- uses: astral-sh/setup-uv@v6
with:
python-version-file: "pyproject.toml"
enable-cache: true
- run: uv sync --locked --all-extras --dev --all-packages
- run: uv run generate_docs
- run: git fetch origin gh-pages --depth=1
- run: git config user.name ci-bot
- run: git config user.email ci-bot@example.com
- run: uv run mike deploy latest
- run: git checkout gh-pages
# Push changes to gh-pages branch
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages