-
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 930 Bytes
/
build-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
46
name: Build and Publish Docs
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'README.md'
- 'mkdocs.yml'
workflow_dispatch:
jobs:
generate_and_publish_docs:
permissions:
contents: write
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python version from file
uses: actions/setup-python@v4
with:
python-version-file: .python-version
- name: Install uv
run: |
python3 -m pip install --upgrade pip
python3 -m pip install uv
- name: Install dev dependencies
run: |
uv sync --dev
- name: Build docs
run: |
uv run mkdocs build
- name: Deploy to GitHub Pages
run: |
uv run mkdocs gh-deploy --force