[WIP] Add hillslope scripts (to python/ctsm/) and external, plus docs #39
Workflow file for this run
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: docs | |
on: | |
push: | |
paths: | |
- 'doc/**' | |
pull_request: | |
paths: | |
- 'doc/**' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test-build-makefile: | |
if: ${{ always() }} | |
name: Test building documentation with makefile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Install python 3.x | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
# https://github.com/actions/cache/blob/main/examples.md#python---pip | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('doc/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -r doc/requirements.txt | |
- name: Call git-fleximod | |
run: | | |
bin/git-fleximod update -o | |
# Build documentation under ${PWD}/_build | |
- name: Build Sphinx docs with makefile | |
run: | | |
make SPHINXOPTS="-W --keep-going" BUILDDIR=${PWD}/_build -C doc/ html | |
test-doc-builder: | |
if: ${{ always() }} | |
name: Test building documentation with doc-builder | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Install python 3.x | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
# https://github.com/actions/cache/blob/main/examples.md#python---pip | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('doc/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -r doc/requirements.txt | |
- name: Call git-fleximod | |
run: | | |
bin/git-fleximod update -o | |
# Build documentation under ${PWD}/_build | |
- name: Build Sphinx docs with doc-builder | |
run: | | |
rm -r .git/hooks && cd doc && ./build_docs -b ${PWD}/_build -c |