-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (43 loc) · 1.1 KB
/
Copy pathCD-main.yml
File metadata and controls
46 lines (43 loc) · 1.1 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: CD on main
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docs/**"
- "mkdocs.yml"
- "src/**"
- "scripts/deploy_docs.py"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/CD-main.yml"
env:
UV_SYSTEM_PYTHON: "1"
jobs:
publish-main-docs:
name: Publish Main Docs
runs-on: ubuntu-latest
environment:
name: release
permissions:
contents: write
pages: write
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: 0.11.16
enable-cache: true
- name: Set up Python
run: uv python install $PYTHON_VERSION && uv python pin $PYTHON_VERSION
env:
PYTHON_VERSION: 3.11.9
- name: Fetch gh-pages branch
run: git fetch origin gh-pages:gh-pages || true
- name: Publish Docs
run: |
git config user.name "github-actions[bot]"
git config user.email "actions@github.com"
uv run --group docs --all-extras python scripts/deploy_docs.py --push main