Skip to content

update cache

update cache #388

Workflow file for this run

---
#----------------------------------------------------------------------------------------
# FILENAME:
# test_documentation.yml
# DESCRIPTION:
# GitHub Actions configuration for clang-format.
# AUTHOR:
# Adam Erickson (Nervosys)
# DATE:
# 2024-02-20
# NOTES:
#
# Copyright © 2024 Nervosys, LLC
#----------------------------------------------------------------------------------------
name: "Build & Deploy: Docs"
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize, reopened, closed]
# workflow_dispatch:
jobs:
build-deploy-docs:
runs-on: ubuntu-22.04
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 numpy msgpack-rpc-python
pip install --upgrade https://github.com/jbms/sphinx-immaterial/tarball/master
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