-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (103 loc) · 3.37 KB
/
documentation.yaml
File metadata and controls
119 lines (103 loc) · 3.37 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: documentation
on:
push:
branches:
- "master"
paths:
# Doc — CI workflow + deploy scripts
- ".github/workflows/documentation.yaml"
- "scripts/ci/deploy-latest-version-documentation.sh"
- "scripts/ci/deploy-stable-version-documentation.sh"
# Doc — MkDocs config
- "mkdocs.yml"
# Doc — Markdown content
- "docs/**/*.md"
# Doc — theme overrides
- "docs/_overrides/**"
# Python source code (mkdocstrings reads docstrings from agent_assembly/)
- "agent_assembly/**/*.py"
# Python project metadata (version is read from pyproject.toml)
- "pyproject.toml"
workflow_run:
workflows: ["release"]
types: [completed]
branches: ["master"]
permissions:
contents: write
id-token: write
pages: write
# Allow one concurrent deployment so a fast-follow push doesn't race the
# previous deploy on gh-pages.
concurrency:
group: "pages-mkdocs"
cancel-in-progress: true
jobs:
deploy_latest_documentation:
name: Deploy latest documentation
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout (full history for mike + git-revision-date plugins)
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install Python 3.13
run: uv python install 3.13
- name: Install docs dependency group
run: uv sync --group docs
- name: Print tool versions
run: |
uv run mkdocs --version
uv run mike --version
- name: Build and deploy latest documentation
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
run: |
# Activate the uv-managed venv so the deploy script's `mkdocs` and
# `mike` commands resolve without the `uv run` prefix.
source .venv/bin/activate
bash ./scripts/ci/deploy-latest-version-documentation.sh
deploy_stable_documentation:
name: Deploy stable documentation (release)
if: |
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout (full history for mike + git-revision-date plugins)
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: master
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install Python 3.13
run: uv python install 3.13
- name: Install docs dependency group
run: uv sync --group docs
- name: Print tool versions
run: |
uv run mkdocs --version
uv run mike --version
- name: Build and deploy stable documentation
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
run: |
source .venv/bin/activate
bash ./scripts/ci/deploy-stable-version-documentation.sh
- name: Deployment summary
env:
STABLE_URL: "https://ai-agent-assembly.github.io/python-sdk/stable/"
run: |
{
echo "## 📚 Stable documentation deployed"
echo "🔗 ${STABLE_URL}"
} >> "$GITHUB_STEP_SUMMARY"