Add test for notebook tutorial execution #46
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: Build and Deploy Docs | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "doc_source/**" | |
| - "src/ect/**" | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| - name: Create venv and install dependencies | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e . | |
| uv pip install sphinx sphinx-rtd-theme nbsphinx autopep8 myst-parser ipykernel pandas | |
| - name: Install python3 Jupyter kernel | |
| run: | | |
| source .venv/bin/activate | |
| python -m ipykernel install --user --name python3 --display-name "Python 3" | |
| - name: Build documentation | |
| run: | | |
| source .venv/bin/activate | |
| make html | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs | |
| force_orphan: true |