Replace Colab notebooks with clean set aligned to tutorials #225
This file contains hidden or 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: Sphinx Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Sphinx and extensions | |
| run: | | |
| pip install sphinx sphinx_rtd_theme nbsphinx Pygments | |
| - name: Generate API documentation | |
| run: | | |
| sphinx-apidoc -f -o ./docs/source/ detectree2/ | |
| - name: Build HTML documentation | |
| run: | | |
| sphinx-build -b html docs/source/ docs/build/html | |
| - name: Upload artifact (HTML) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: html-docs | |
| path: docs/build/html/ | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/master' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/build/html |