Skip to content

Commit e549aed

Browse files
committed
chore: add build docs script.
1 parent d60a297 commit e549aed

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/build-docs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build Docs
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'docs/zh/**'
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: 3.8
18+
- uses: actions/cache@v3
19+
id: cache
20+
with:
21+
path: ${{ env.pythonLocation }}
22+
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-docs
23+
24+
- run: pip install mkdocs-material
25+
- run: pip install mkdocstrings
26+
27+
- name: Build Docs
28+
run: |
29+
cd ./docs/zh
30+
mkdocs gh-deploy --force
31+

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ test = [
5050
"pytest-asyncio>=0.17",
5151
"httpx",
5252
]
53+
docs = [
54+
"mkdocs-material>=8.3.8",
55+
"mkdocstrings>=0.19.0",
56+
]
5357
# pytest
5458
[tool.pytest.ini_options]
5559
minversion = "6.0"

0 commit comments

Comments
 (0)