Skip to content

Commit 64591f6

Browse files
authored
chore(docs): generate api docs (#277)
1 parent 92a59f1 commit 64591f6

File tree

7 files changed

+11015
-39
lines changed

7 files changed

+11015
-39
lines changed

.github/workflows/on-docs-change.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
paths:
88
- 'docs/**'
9+
- 'README.md'
910
- 'CHANGELOG.md'
1011
- 'mkdocs.yml'
1112
- '.github/workflows/on-docs-change.yml'
@@ -20,25 +21,35 @@ jobs:
2021
- name: Set up Python
2122
uses: actions/[email protected]
2223
with:
23-
python-version: "3.8"
24+
python-version: '3.8'
25+
- name: Set up NodeJS
26+
uses: actions/setup-node@v2
27+
with:
28+
node-version: '17.2'
2429
- name: Install dependencies
2530
run: |
2631
pip install --upgrade pip
2732
pip install mike==1.1.2 mkdocs-material==8.0.5 mkdocs-git-revision-date-plugin==0.3.1
33+
npm ci
2834
- name: Setup doc deploy
2935
run: |
3036
git config --global user.name Docs deploy
3137
git config --global user.email [email protected]
32-
- name: Build docs website and (TODO) API reference
38+
- name: Build mkdocs site in 'gh-pages' branch and push
3339
run: |
40+
rm -rf site
3441
VERSION="develop"
3542
ALIAS="stage"
3643
mkdocs build
3744
mike deploy --push --update-aliases "$VERSION" "$ALIAS"
38-
- name: Deploy all docs
45+
- name: Build API documentation site
46+
run: |
47+
rm -rf api
48+
npm run docs-generateApiDoc
49+
- name: Deploy API documentation site (copy to "gh-pages" branch inside the version folder)
3950
uses: peaceiris/actions-gh-pages@v3
4051
with:
4152
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
publish_dir: ./site
53+
publish_dir: ./api
4354
keep_files: true
4455
destination_dir: develop/api

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ coverage
3535
venv
3636

3737
# Static documentation site generated by Mkdocs
38-
site
38+
site
39+
40+
# Generated API documentation (from TypeDoc)
41+
/api

0 commit comments

Comments
 (0)