Skip to content

Commit 540a108

Browse files
committed
docs: adapted from eCLM
1 parent f1440b8 commit 540a108

File tree

6 files changed

+122
-0
lines changed

6 files changed

+122
-0
lines changed

.github/workflows/docs.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- tsmp-pdaf-patched
7+
- tsmp-pdaf-patched-doc
8+
9+
env:
10+
BASE_URL: /${{ github.event.repository.name }}
11+
12+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
13+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
deploy-docs:
20+
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
permissions:
25+
pages: write
26+
id-token: write
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up Python 3.11
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: 3.11
34+
cache: 'pip'
35+
36+
- name: Install dependencies
37+
run: pip install -r ${GITHUB_WORKSPACE}/docs/requirements.txt
38+
39+
- name: Build TSMP-PDAF doc homepage
40+
working-directory: ./docs
41+
run: |
42+
make clean docs
43+
44+
- name: Build eCLM Source Code browser
45+
working-directory: ./docs
46+
run: |
47+
make src-browser-lib
48+
49+
- name: Upload documentation artifacts
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: "docs/_build/html"
53+
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

docs/FORD_options.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
project: TSMP-PDAF Source Code Browser
3+
author: HPSC TerrSys
4+
doc_license: mit
5+
base_url: https://hpscterrsys.github.io/pdaf/src
6+
project_github: https://github.com/HPSCTerrSys/pdaf
7+
---
8+
9+
Test 1 2 3
10+
11+
<!--
12+
FORD (FORtran Documenter) project options list:
13+
14+
https://forddocs.readthedocs.io/en/latest/user_guide/project_file_options.html#project-file-options
15+
-->
16+

docs/FORD_options_int.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
project: TSMP-PDAF Source Code Browser - Interface
3+
author: HPSC TerrSys
4+
doc_license: mit
5+
base_url: https://hpscterrsys.github.io/pdaf/interface
6+
project_github: https://github.com/HPSCTerrSys/pdaf
7+
---
8+
9+
Test 1 2 3
10+
11+
<!--
12+
FORD (FORtran Documenter) project options list:
13+
14+
https://forddocs.readthedocs.io/en/latest/user_guide/project_file_options.html#project-file-options
15+
-->
16+

docs/INDEX.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# TSMP-PDAF Documentation
2+
3+
```{important}
4+
**Welcome!** You are viewing the first version of the documentation for TSMP-PDAF. This is a living document, which means it will be continuously updated and improved. Please check back regularly for the latest information and updates.
5+
6+
This documentation is adapted from the eCLM-documentation: https://github.com/HPSCTerrSys/eCLM
7+
```
8+
9+
```{tableofcontents}
10+
```

docs/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
BUILD_DIR = ./_build
2+
SRC_DIR_LIB = ../src
3+
SRC_DIR_INT = ../interface
4+
5+
all: docs src-browser-lib src-browser-interface
6+
7+
docs:
8+
jupyter-book build -W -n --keep-going .
9+
10+
src-browser-lib:
11+
ford -d $(SRC_DIR_LIB) -o $(BUILD_DIR)/html/src FORD_options.md
12+
13+
src-browser-interface:
14+
ford -d $(SRC_DIR_INT) -o $(BUILD_DIR)/html/interface FORD_options_int.md
15+
16+
.PHONY: clean
17+
18+
clean:
19+
jupyter-book clean .

docs/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
jupyter-book
2+
matplotlib
3+
numpy
4+
ghp-import
5+
ford

0 commit comments

Comments
 (0)