Skip to content

Commit b1e4223

Browse files
milliondreamsclaude
andcommitted
fix(ci): add missing dependencies and caching to docs workflow
- Add mkdocs base package (was missing, mkdocs-material is just a theme) - Add Rust dependency caching with Swatinem/rust-cache@v2 - Add pip dependency caching with actions/cache@v4 - Add uni-crdt to cargo doc (missing library crate) - Add uni_pydantic to pdoc generation - Improve formatting of cargo doc command for readability Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fc71b14 commit b1e4223

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
- name: Setup Rust
3030
uses: dtolnay/rust-toolchain@stable
3131

32+
- name: Cache Rust dependencies
33+
uses: Swatinem/rust-cache@v2
34+
with:
35+
cache-on-failure: true
36+
3237
- name: Install system dependencies
3338
run: |
3439
sudo apt-get update
@@ -39,6 +44,14 @@ jobs:
3944
with:
4045
python-version: '3.11'
4146

47+
- name: Cache pip dependencies
48+
uses: actions/cache@v4
49+
with:
50+
path: ~/.cache/pip
51+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
52+
restore-keys: |
53+
${{ runner.os }}-pip-
54+
4255
# Build Rust crates (required by Python bindings and cargo doc)
4356
- name: Build Rust crates
4457
run: cargo build --release
@@ -51,16 +64,16 @@ jobs:
5164
maturin build --release
5265
pip install ../../target/wheels/*.whl
5366
54-
# Install uni-pydantic (pydantic notebooks need it)
67+
# Install uni-pydantic and its dependencies (pydantic notebooks need it)
5568
# uni-db requirement is satisfied by wheel installed above
5669
- name: Install uni-pydantic
5770
run: |
5871
pip install ./bindings/python/uni-pydantic
5972
60-
# Install MkDocs dependencies (including mkdocs-jupyter for notebook execution)
73+
# Install MkDocs and all dependencies for notebook execution
6174
- name: Install MkDocs dependencies
6275
run: |
63-
pip install mkdocs-material mkdocs-jupyter pymdown-extensions pdoc
76+
pip install mkdocs mkdocs-material mkdocs-jupyter pymdown-extensions pdoc
6477
6578
# Build MkDocs (executes notebooks via mkdocs-jupyter, cleans site directory)
6679
- name: Build MkDocs Documentation
@@ -71,13 +84,19 @@ jobs:
7184
# Build and copy API docs AFTER MkDocs (since mkdocs cleans site/)
7285
- name: Build Rust documentation
7386
run: |
74-
cargo doc --no-deps --document-private-items -p uni -p uni-common -p uni-query -p uni-store -p uni-algo
87+
cargo doc --no-deps --document-private-items \
88+
-p uni \
89+
-p uni-common \
90+
-p uni-query \
91+
-p uni-store \
92+
-p uni-algo \
93+
-p uni-crdt
7594
mkdir -p website/site/api/rust
7695
cp -r target/doc/* website/site/api/rust/
7796
7897
- name: Build Python documentation
7998
run: |
80-
pdoc -o website/site/api/python uni_db
99+
pdoc -o website/site/api/python uni_db uni_pydantic
81100
82101
- name: Setup Pages
83102
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)