Skip to content

Commit 50efb6c

Browse files
committed
Merge remote-tracking branch 'origin/main' into codex/otel-traces
2 parents 7915adc + fcf925a commit 50efb6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+9553
-1222
lines changed

.github/workflows/docs.yaml

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@ on:
44
push:
55
branches: [main]
66
paths:
7-
- mkdocs.yml
87
- 'docs/**'
98
- 'src/**'
10-
- 'scripts/hooks.py'
9+
- 'scripts/generate_provider_table.py'
10+
- 'scripts/generate_llms_txt.py'
11+
- 'scripts/generate_openapi.py'
12+
- 'scripts/generate_api_docs.py'
1113
- '.github/workflows/**'
1214
- 'pyproject.toml'
1315
pull_request:
1416
paths:
15-
- mkdocs.yml
1617
- 'docs/**'
1718
- 'src/**'
18-
- 'scripts/hooks.py'
19+
- 'scripts/generate_provider_table.py'
20+
- 'scripts/generate_llms_txt.py'
21+
- 'scripts/generate_openapi.py'
22+
- 'scripts/generate_api_docs.py'
1923
- '.github/workflows/**'
2024
- 'pyproject.toml'
2125
workflow_dispatch:
@@ -24,6 +28,8 @@ jobs:
2428
docs:
2529
permissions:
2630
contents: write
31+
pages: write
32+
id-token: write
2733
runs-on: ubuntu-latest
2834
steps:
2935
- name: Check out the repository
@@ -37,19 +43,39 @@ jobs:
3743
python-version: 3.13
3844
activate-environment: true
3945

40-
- name: Configure git
41-
run: |
42-
git config user.name 'github-actions[bot]'
43-
git config user.email 'github-actions[bot]@users.noreply.github.com'
46+
- name: Set up Node.js
47+
uses: actions/setup-node@v4
48+
with:
49+
node-version: 22
50+
51+
- name: Install Python dependencies
52+
run: uv sync --group docs --extra all
53+
54+
- name: Install docs dependencies
55+
working-directory: docs
56+
run: npm ci
57+
58+
- name: Generate provider table
59+
run: uv run python scripts/generate_provider_table.py
4460

45-
- name: Install dependencies
46-
run: |
47-
uv sync --group docs --extra all
61+
- name: Generate OpenAPI spec
62+
run: uv run python scripts/generate_openapi.py
63+
64+
- name: Generate API docs
65+
run: uv run python scripts/generate_api_docs.py
4866

4967
- name: Build docs
50-
if: github.event_name == 'pull_request'
51-
run: mkdocs build -s
68+
working-directory: docs
69+
run: npm run build
70+
env:
71+
CI: true
72+
73+
- name: Generate llms.txt
74+
run: uv run python scripts/generate_llms_txt.py
5275

53-
- name: Publish docs
76+
- name: Deploy to GitHub Pages
5477
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
55-
run: mkdocs gh-deploy
78+
uses: peaceiris/actions-gh-pages@v4
79+
with:
80+
github_token: ${{ secrets.GITHUB_TOKEN }}
81+
publish_dir: docs/dist

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ repos:
4949
rev: "v2.4.1"
5050
hooks:
5151
- id: codespell
52-
exclude: CODE_OF_CONDUCT.md|tests/assets
52+
exclude: CODE_OF_CONDUCT.md|tests/assets|package-lock\.json
5353

5454
- repo: https://github.com/kynan/nbstripout
5555
rev: 0.9.1

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Documentation to update:
141141
- **docs/providers.md** when adding providers
142142

143143
```bash
144-
mkdocs serve
144+
cd docs && npm run dev
145145
```
146146

147147
### 5. Commit Your Changes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<picture>
3-
<img src="https://raw.githubusercontent.com/mozilla-ai/any-llm/refs/heads/main/docs/images/any-llm-logo-mark.png" width="20%" alt="Project logo"/>
3+
<img src="https://raw.githubusercontent.com/mozilla-ai/any-llm/refs/heads/main/docs/public/images/any-llm-logo-mark.png" width="20%" alt="Project logo"/>
44
</picture>
55
</p>
66

docs/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
src/content/docs/api/

docs/api/any_llm.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/api/batch.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/api/completion.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api/embedding.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api/exceptions.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)