Merge pull request #252 from Modalities/release_automation #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build Sphinx Documentation" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
pip install myst-parser | |
pip install . | |
pip install sphinx-rtd-theme sphinx-autodoc-typehints sphinx-click sphinx-automodapi texext | |
- name: "Parse into HTML" | |
run: | | |
sphinx-apidoc -o docs/source/api src/modalities | |
sphinx-build -M html docs/source/ docs/build/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/build/html | |
force_orphan: true | |