-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (48 loc) · 1.39 KB
/
docs.yml
File metadata and controls
58 lines (48 loc) · 1.39 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
47
48
49
50
51
52
53
54
55
56
57
58
name: Docs
on:
pull_request:
push:
branches:
- "develop"
release:
types:
- created
env:
UV_USE_ACTIVE_ENV: 1
jobs:
build:
name: Publish documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install uv
uses: yezz123/setup-uv@v4
with:
uv-version: "0.8.12"
- name: Install package with doc dependencies
run: |
uv sync --group docs
- name: Configure Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git fetch origin gh-pages:gh-pages
- name: Dry run
if: github.event_name == 'pull_request'
run: |
uv run mkdocs build
- name: Upload and tag as latest
if: github.ref == 'refs/heads/develop'
run: |
uv run mike deploy --push latest
uv run mike set-default --push latest
- name: Upload and tag as git tag
if: github.event_name == 'release' && github.event.action == 'created'
run: |
uv run mike deploy --push ${{ github.ref_name }}
uv run mike set-default --push latest