Skip to content

feat: publish to readme #85

feat: publish to readme

feat: publish to readme #85

Workflow file for this run

name: API Docs
on:
pull_request:
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@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Setup cache
uses: actions/cache@v4
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 [email protected]
# 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@v8
with:
rdme: docs docs/_pydoc/temp --key=${{ secrets.README_API_KEY }} --version=1.0