Skip to content

Fix image size on wiki #23

Fix image size on wiki

Fix image size on wiki #23

on:
push:
branches:
- main
- docs
jobs:
generate_doc:
name: Generate the documentation from the JSON Schemas
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: ${{ github.repository }}.wiki
path: .wiki
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Install json-schema-for-humans
run: pip install json-schema-for-humans
- name: Generate the documentation
run: |
generate-schema-doc --config template_name=md_nested ./.schema/controller.json "./.wiki/Controller Definition.md"
generate-schema-doc --config template_name=md_nested ./.schema/manufacturer.json "./.wiki/Manufacturer Definition.md"
generate-schema-doc --config template_name=md_nested ./.schema/category.json "./.wiki/Category Definition.md"
- name: Generate Conntroller List
run: |
python3 .utilities/generate_controller_tables.py
- run: git pull
- name: Commit files
run: |
cd .wiki
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add *
if ! git diff-index --quiet HEAD; then
git commit -m "Update documentation" -a
fi
git push