-
Notifications
You must be signed in to change notification settings - Fork 83
48 lines (39 loc) · 1.17 KB
/
Copy pathdocs-deploy.yml
File metadata and controls
48 lines (39 loc) · 1.17 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
name: Deploy Documentation
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
# gh-deploy force-pushes gh-pages; concurrent runs race on the ref and the
# loser fails with "cannot lock ref". Only the newest commit's docs matter.
concurrency:
group: docs-deploy
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: |
pip install uv
uv venv
source .venv/bin/activate
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
uv sync --frozen --all-extras
- name: Validate documentation contracts
run: uv run pytest -n0 tests/docs
- name: Build documentation strictly
run: uv run mkdocs build --strict --site-dir /tmp/lionagi-docs-site
- name: Deploy documentation
run: uv run mkdocs gh-deploy --strict --force