Merge pull request #210 from NLR-Distribution-Suite/207-upgrade-handl… #113
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: deploy-book | |
| on: | |
| push: | |
| branches: | |
| - main # or your default branch | |
| jobs: | |
| github-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install system dependencies (Graphviz) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y graphviz graphviz-dev | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install graphviz pygraphviz | |
| python -m pip install ".[doc]" | |
| pip install ghp-import matplotlib gdmloader | |
| - name: Build the book | |
| working-directory: docs | |
| env: | |
| NODE_TLS_REJECT_UNAUTHORIZED: "0" | |
| BASE_URL: "/grid-data-models" | |
| run: | | |
| jupyter-book clean --html --temp --logs -y | |
| jupyter-book build --html | |
| - name: Build dedicated Sphinx API docs | |
| run: | | |
| python -m sphinx.ext.apidoc -o docs/api_sphinx/generated src/gdm --force --separate --module-first | |
| python -m sphinx -b html docs/api_sphinx docs/_build/html/python-api | |
| - name: Deploy to GitHub Pages | |
| run: | | |
| ghp-import -n -p -f docs/_build/html |