diff --git a/.github/workflows/sphinx-docs.yml b/.github/workflows/sphinx-docs.yml index e0e14f31..8bc771ca 100644 --- a/.github/workflows/sphinx-docs.yml +++ b/.github/workflows/sphinx-docs.yml @@ -19,20 +19,35 @@ jobs: with: python-version: '3.10' - - name: Install dependencies + - name: Install dependencies for main docs + working-directory: ./docs run: | python -m pip install --upgrade pip - pip install -r docs/requirements.txt + pip install -r requirements.txt + + - name: Install dependencies for Python client docs + working-directory: ./client/python/projectairsim/docs + run: | + pip install -r requirements.txt - - name: Build HTML with Sphinx + - name: Build Python client docs + working-directory: ./client/python/projectairsim/docs + run: make html + + - name: Build main docs working-directory: ./docs run: make html + - name: Copy Python client docs into main docs + run: | + mkdir -p docs/build/html/client_api + cp -r client/python/projectairsim/docs/build/html/* docs/build/html/client_api/ + - name: Deploy to gh_page branch if: github.event_name == 'push' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/build/html + publish_dir: docs/build/html publish_branch: gh_page force_orphan: true diff --git a/client/python/projectairsim/docs/Makefile b/client/python/projectairsim/docs/Makefile index d4bb2cbb..ed880990 100644 --- a/client/python/projectairsim/docs/Makefile +++ b/client/python/projectairsim/docs/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . -BUILDDIR = _build +BUILDDIR = build # Put it first so that "make" without argument is like "make help". help: diff --git a/client/python/projectairsim/docs/conf.py b/client/python/projectairsim/docs/conf.py index f6d025df..15a6e649 100644 --- a/client/python/projectairsim/docs/conf.py +++ b/client/python/projectairsim/docs/conf.py @@ -3,6 +3,8 @@ # Add projectairsim src/ folder to the Python path for sphinx to find it import os import sys + +import sphinx_rtd_theme sys.path.insert(0, os.path.abspath("../src")) project = 'Project AirSim' @@ -19,5 +21,5 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'haiku' -html_static_path = ['_static'] +html_theme = 'sphinx_rtd_theme' +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]