Skip to content

update docs action

update docs action #23

Workflow file for this run

name: "Documentation Build and Deployment"
on: [push, pull_request, workflow_dispatch] # triggers
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: "x64"
- name: "Install dependencies: MkDocs Material"
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install mkdocs mkdocs-material pymdown-extensions mkdocstrings[python]
- name: "Build API reference documentation: Sphinx Immaterial"
run: |
python3 -m venv .env # virtual env to avoid dependecy issues
source .env/bin/activate
pip install sphinx sphinx-immaterial numpy msgpack-rpc-python
pushd Python >/dev/null
./scripts/build_api_docs.sh
popd >/dev/null
cp -r Python/docs/_build docs/api_docs/ # copy generated files
deactivate
- name: "Build AutonomySim documentation"
run: ./scripts/build_docs.sh
# Only on commits to 'master' branch
- name: "Deploy 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