SW data-driven radiation model #187
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 book | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies with pip | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
python -m pip install git+https://github.com/atmtools/climt@rrtmg-only --no-binary climt | |
TARGET=HASWELL python -m pip install .[docs] | |
python -m pip list | |
- name: build book | |
run: | | |
conda info | |
jupyter-book build -W -n --keep-going howto | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: build | |
path: howto/_build | |
retention-days: 1 | |
publish: | |
needs: build | |
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'atmtools'" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download compiled book | |
uses: actions/download-artifact@v4 | |
with: | |
name: build | |
path: _build | |
- name: Publish book on github pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/html |