diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 425add3c..e2d96c5c 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -29,12 +29,34 @@ jobs: with: working-directory: pathplannerlib - - name: Move to docs dir + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - name: Install python dependencies + working-directory: ./pathplannerlib-python + run: | + python -m pip install --upgrade pip + pip install build handsdown mkdocs mkdocs-material + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Generate python docs + working-directory: ./pathplannerlib-python + run: | + handsdown --external https://github.com/mjansen4857/pathplanner.git -o docsmd -n pathplannerlib --theme=material --create-configs include pathplannerlib + python -m mkdocs build + + - name: Move java/cpp to docs dir working-directory: pathplannerlib/build/docs run: | mkdir docs sudo mv javadoc docs/java sudo mv cpp/html docs/cpp + + - name: Move python to docs dir + run: | + sudo mv pathplannerlib-python/docs pathplannerlib/build/docs/docs/python - name: Deploy generated documentation to GitHub Pages uses: s0/git-publish-subdir-action@v2.6.0 diff --git a/pathplannerlib-python/.gitignore b/pathplannerlib-python/.gitignore index 7994f46c..4a5a185b 100644 --- a/pathplannerlib-python/.gitignore +++ b/pathplannerlib-python/.gitignore @@ -1,2 +1,4 @@ /dist -/*.egg-info \ No newline at end of file +/*.egg-info +/docs +/docsmd \ No newline at end of file