Skip to content

Commit 3e8d92d

Browse files
committed
ci: add mkdocs build and push workflow
1 parent 7347645 commit 3e8d92d

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: mkdocs build and push
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout sdk
14+
uses: actions/checkout@v4
15+
with:
16+
repository: offline-function-calling/sdk
17+
path: sdk
18+
- name: checkout site
19+
uses: actions/checkout@v4
20+
with:
21+
path: org
22+
23+
- name: configure bot
24+
run: |
25+
git config user.name github-actions[bot]
26+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
27+
28+
- name: install uv
29+
uses: astral-sh/setup-uv@v5
30+
with:
31+
enable-cache: true
32+
cache-dependency-glob: sdk/uv.lock
33+
- name: setup python
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version-file: sdk/pyproject.toml
37+
38+
- name: install deps
39+
run: |
40+
cd sdk/
41+
uv sync --locked --all-extras --dev
42+
43+
- name: build and push
44+
run: |
45+
cd sdk/
46+
source .venv/bin/activate.sh
47+
cd ../org/
48+
mkdocs gh-deploy --force \
49+
--message 'chore: deploy offline-function-calling/sdk@{sha}' \
50+
--remote-branch 'pages' --config-file ../sdk/mkdocs.yaml

0 commit comments

Comments
 (0)