-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (52 loc) · 1.98 KB
/
api-docs.yaml
File metadata and controls
66 lines (52 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: API Docs
on:
release:
types:
- published
env:
CATEGORY_ID: ${{ secrets.CATEGORY_ID }}
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.x
- name: Setup cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
key: ${{ github.ref }}
path: .cache
- name: Install dependencies for doc generation
run: |
python -m pip install --upgrade pip
pip install -r docs/_pydoc/requirements.txt
pip install --upgrade setuptools # Fix to prevent: ModuleNotFoundError: No module named 'pkg_resources'
- name: Generate API docs
run: ./.github/utils/pydoc-markdown.sh
- name: Configure git to push docs
run: |
git config --global user.name docs-bot
git config --global user.email docs@bot.com
git config pull.rebase false
git pull --allow-unrelated-histories origin gh-pages
- name: Install dependencies for doc deployment
run: pip install mkdocs-material mkdocstrings[python] mkdocs-mermaid2-plugin mike
- name: Publish docs to pages
run: |
mike deploy --push --update-aliases ${{github.ref_name}} && \
mike set-default --push ${{github.ref_name}}
- name: Add Category ID to all API docs
run: python ./.github/utils/add-category-id.py
env:
MARKDOWN_FILES_DIRECTORY: docs/_pydoc/temp/
CATEGORY_ID: ${{env.CATEGORY_ID}}
- name: Run `docs` command 🚀
uses: readmeio/rdme@3c41af599df44e516c90ba4107a81c05d4945822 # v10.6.2
with:
rdme: docs docs/_pydoc/temp --key=${{ secrets.README_API_KEY }} --version=1.0