Skip to content

feat: create base wflow model #1409

feat: create base wflow model

feat: create base wflow model #1409

Workflow file for this run

---
name: Build Documentation
on:
workflow_dispatch:
push:
branches: [main, feat/migration-hydromt-core-v1]
paths:
- docs/*
- examples/*
- hydromt_wflow/*
- pyproject.toml
- .github/workflows/docs.yml
pull_request:
branches: [main, feat/migration-hydromt-core-v1]
paths:
- docs/*
- examples/*
- hydromt_wflow/*
- pyproject.toml
- .github/workflows/docs.yml
jobs:
# Build docs on Linux
docs:
defaults:
run:
shell: bash -l {0}
env:
branch_name: ${{ github.head_ref || github.ref_name }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
include:
- os: ubuntu-latest
label: linux-64
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Setup pixi env
uses: prefix-dev/[email protected]
with:
pixi-version: "v0.47.0"
environments: docs
locked: false
cache: true
cache-write: ${{ github.event_name == 'push' && ( github.ref_name == 'feat/migration-hydromt-core-v1' || github.ref_name == 'feat/migration-hydromt-core-v1' ) }}
- name: Generate dummy docs
if: ${{ github.event_name == 'pull_request' }}
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: pixi run -e docs docs-dummy
- name: Generate docs
if: ${{ github.event_name != 'pull_request' && !github.event.act }}
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: |
pixi run -e docs docs-html
echo "DOC_VERSION=$(pixi run --locked -e docs python -c 'from hydromt_wflow import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV
- name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request'}}
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
exclude_assets: '.buildinfo,_sources/*,_examples/*.ipynb'
destination_dir: ./${{ env.DOC_VERSION }}
keep_files: false
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages