Skip to content

update formatting

update formatting #106

Workflow file for this run

name: "Build and Deploy: Documentation (Doxygen, Sphinx, MkDocs)"
on: [push, pull_request, workflow_dispatch]
jobs:
build-deploy-docs:
runs-on: ubuntu-22.04 # ubuntu-latest; use static version for stability
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: "x64"
- name: "Generate Doxygen XML output for C++ API"
uses: mattnotmitt/doxygen-action@v1.9.8
with:
doxyfile-path: AutonomyLib/docs/Doxyfile
working-directory: .
- name: "Install Python dependencies: MkDocs-Material, Sphinx-Immaterial, Breathe, Exhale"
shell: bash
run: |
python3 -m venv .env # virtual environment to avoid dependecy issues
source ./.env/bin/activate
python3 -m pip install --upgrade pip
pip install mkdocs mkdocs-material pymdown-extensions # mkdocstrings[python]
pip install sphinx sphinx-immaterial numpy msgpack-rpc-python
pip install breathe exhale # for doxygen -> sphinx -> html conversion
- name: "Generate C++ API documentation: Doxygen -> Sphinx -> HTML"
shell: bash
run: |
source ./.env/bin/activate
(cd ./AutonomyLib/docs; make html)
cp -r ./AutonomyLib/docs/_build/* ./docs/api/cpp/ # copy generated API documentation
deactivate
- name: "Generate Python API documentation: Sphinx -> HTML"
shell: bash
run: |
source ./.env/bin/activate
(cd ./python/docs; make html)
cp -r ./python/docs/_build/* ./docs/api/python/ # copy generated API documentation
deactivate
- name: "Generate project documentation: MkDocs -> HTML"
shell: bash
#run: bash ./scripts/build_docs.sh
run: |
cp ./README.md ./docs/
sed -i 's/](docs\//](/g' ./docs/README.md
source ./.env/bin/activate
mkdocs build
deactivate
- name: "Deploy generated HTML on commits to master branch"
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build_docs