Skip to content

Docs

Docs #46

Workflow file for this run

---
name: Build Documentation
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
docs:
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest" ] #, "macos-latest", "windows-latest"]
python-version: ["3.11"] # fix tests to support older versions
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/fiat_test
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install ubuntu packages
run: |
sudo apt install -y curl
sudo apt install -y gdebi-core
mkdir tmp
- name: Download quarto
run: |
curl -L https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.deb --output tmp/quarto.deb
chmod +x tmp/quarto.deb
- name: Install quarto
run: sudo gdebi -n tmp/quarto.deb
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: fiat_docs
use-mamba: true
- name: Generate env yaml
run: python make_env.py docs --py-version ${{ matrix.python-version }}.*
- name: Update environment
run: |
mamba env update -f environment.yml
pip install -e .
- name: Generate API Reference
run: |
python docs/api.py
cd docs/
quartodoc interlinks _quarto.yml
cd ..
- name: Generate docs
run: |
quarto render docs/
echo "DOC_VERSION=$(mamba run -n hydromt python -c 'from fiat import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV