Skip to content

Commit a2782b4

Browse files
authored
Merge pull request #3146 from samsrabin/auto-publish
ctsm5.3.048: Automatically publish docs to this repo
2 parents d74a821 + 137ddc9 commit a2782b4

32 files changed

+666
-805
lines changed

.github/ISSUE_TEMPLATE/03_documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ about: Something should be added to or fixed in the documentation
1212
- [ ] Something is broken.
1313

1414
### What part(s) of the documentation does this concern?
15-
- [ ] [Technical Note](https://escomp.github.io/ctsm-docs/versions/master/html/tech_note/index.html) (science and design of the model)
16-
- [ ] [User's Guide](https://escomp.github.io/ctsm-docs/versions/master/html/users_guide/index.html) (using the model and related tools)
15+
- [ ] [Technical Note](https://escomp.github.io/ctsm/tech_note/index.html) (science and design of the model)
16+
- [ ] [User's Guide](https://escomp.github.io/ctsm/users_guide/index.html) (using the model and related tools)
1717
- [ ] Somewhere else (e.g., README file, tool help text, or code comment): _Please specify_
1818
- [ ] I don't know
1919

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy static content to Pages
2+
3+
on:
4+
push:
5+
# Run when a change to these files is pushed to master.
6+
branches: ['master', 'release-clm5.0']
7+
paths:
8+
- 'doc/**'
9+
- '!doc/*ChangeLog*'
10+
- '!doc/*ChangeSum*'
11+
- '!doc/UpdateChangelog.pl'
12+
# Include all include::ed files outside doc/ directory!
13+
- 'src/README.unit_testing'
14+
- 'tools/README'
15+
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
20+
permissions:
21+
contents: read
22+
pages: write
23+
id-token: write
24+
25+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
26+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
27+
concurrency:
28+
group: "pages"
29+
cancel-in-progress: false
30+
31+
jobs:
32+
33+
build-and-deploy:
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
with:
43+
# Get all history, ensuring all branches are available for checkout
44+
fetch-depth: 0
45+
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v5
48+
49+
- name: Build docs using container
50+
id: build-docs
51+
run: |
52+
bin/git-fleximod update -o
53+
cd doc
54+
./build_docs_to_publish -d --site-root https://escomp.github.io/ctsm
55+
56+
- name: Upload artifact
57+
uses: actions/upload-pages-artifact@v3
58+
with:
59+
# Upload publish dir
60+
path: 'doc/_publish'
61+
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

.github/workflows/docs-ctsm_pylib.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ on:
66
branches: ['*']
77
paths:
88
- 'python/conda_env_ctsm_py.txt'
9+
- '.github/workflows/docs-common.yml'
910

1011
pull_request:
1112
# Run on pull requests that change the listed files
1213
paths:
1314
- 'python/conda_env_ctsm_py.txt'
15+
- '.github/workflows/docs-common.yml'
1416

1517
schedule:
1618
# 8 am every Monday UTC

.github/workflows/docs-omnibus.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Run an omnibus test script for the docs
2+
3+
on:
4+
push:
5+
# Run when a change to these files is pushed to any branch. Without the "branches:" line, for some reason this will be run whenever a tag is pushed, even if the listed files aren't changed.
6+
branches: ['*']
7+
paths:
8+
- 'doc/**'
9+
- '!doc/*ChangeLog*'
10+
- '!doc/*ChangeSum*'
11+
- '!doc/UpdateChangelog.pl'
12+
# Include all include::ed files outside doc/ directory!
13+
- 'src/README.unit_testing'
14+
- 'tools/README'
15+
16+
pull_request:
17+
# Run on pull requests that change the listed files
18+
paths:
19+
- 'doc/**'
20+
- '!doc/*ChangeLog*'
21+
- '!doc/*ChangeSum*'
22+
- '!doc/UpdateChangelog.pl'
23+
# Include all include::ed files outside doc/ directory!
24+
- 'src/README.unit_testing'
25+
- 'tools/README'
26+
27+
workflow_dispatch:
28+
29+
jobs:
30+
build-docs-omnibus-test:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
lfs: true
37+
38+
- name: Checkout doc-builder external
39+
run: |
40+
bin/git-fleximod update doc-builder
41+
42+
# Set up conda
43+
- name: Set up conda environment
44+
uses: conda-incubator/setup-miniconda@v3
45+
with:
46+
activate-environment: ctsm_pylib
47+
environment-file: python/conda_env_ctsm_py.yml
48+
channels: conda-forge
49+
auto-activate-base: false
50+
51+
# TODO: Split testing.sh tests into their own steps in this job
52+
- name: Text Sphinx builds with omnibus script
53+
run: |
54+
cd doc && conda run -n ctsm_pylib ./testing.sh

.github/workflows/docs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- '!doc/*ChangeLog*'
1111
- '!doc/*ChangeSum*'
1212
- '!doc/UpdateChangelog.pl'
13+
- '.github/workflows/docs-common.yml'
14+
# Include all include::ed files outside doc/ directory!
15+
- 'src/README.unit_testing'
16+
- 'tools/README'
1317

1418
pull_request:
1519
# Run on pull requests that change the listed files
@@ -18,6 +22,10 @@ on:
1822
- '!doc/*ChangeLog*'
1923
- '!doc/*ChangeSum*'
2024
- '!doc/UpdateChangelog.pl'
25+
- '.github/workflows/docs-common.yml'
26+
# Include all include::ed files outside doc/ directory!
27+
- 'src/README.unit_testing'
28+
- 'tools/README'
2129

2230
workflow_dispatch:
2331

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ Depends
114114

115115
# Docs build output
116116
_build*/
117-
117+
_publish*/

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial
124124
[submodule "doc-builder"]
125125
path = doc/doc-builder
126126
url = https://github.com/ESMCI/doc-builder
127-
fxtag = v2.0.0
127+
fxtag = v2.1.2
128128
fxrequired = ToplevelOptional
129129
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
130130
fxDONOTUSEurl = https://github.com/ESMCI/doc-builder

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ http://www.cesm.ucar.edu/models/cesm2.0/land/
1515

1616
and
1717

18-
https://escomp.github.io/ctsm-docs/
18+
https://escomp.github.io/ctsm/
1919

2020
For help with how to work with CTSM in git, see
2121

doc/ChangeLog

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,68 @@
11
===============================================================
2+
Tag name: ctsm5.3.048
3+
Originator(s): samrabin (Sam Rabin, UCAR/TSS)
4+
Date: Mon May 26 18:30:59 MDT 2025
5+
One-line Summary: Automatically publish docs to this repo
6+
7+
Purpose and description of changes
8+
----------------------------------
9+
10+
Enables automatic publication of documentation to this repo's GitHub Pages, making ctsm-docs repo obsolete. Also updates documentation documentation.
11+
12+
13+
Significant changes to scientifically-supported configurations
14+
--------------------------------------------------------------
15+
16+
Does this tag change answers significantly for any of the following physics configurations?
17+
(Details of any changes will be given in the "Answer changes" section below.)
18+
19+
[ ] clm6_0
20+
21+
[ ] clm5_0
22+
23+
[ ] ctsm5_0-nwp
24+
25+
[ ] clm4_5
26+
27+
28+
Bugs fixed
29+
----------
30+
31+
List of CTSM issues fixed (include CTSM Issue # and description):
32+
- [Issue #2541: Some links in User's Guide sidebar are broken](https://github.com/ESCOMP/CTSM/issues/2541)
33+
- [Issue #2839: Automatically publish updated docs](https://github.com/ESCOMP/CTSM/issues/2839)
34+
- [Issue #3121: Fix capital letter in doc filenames](https://github.com/ESCOMP/CTSM/issues/3121)
35+
36+
Notes of particular relevance for users
37+
---------------------------------------
38+
39+
Changes to documentation:
40+
- Canonical URL for User's Guide and Tech Note will be changing from https://escomp.github.io/ctsm-docs to https://escomp.github.io/ctsm.
41+
- Updates to "Working with the CTSM documentation" section
42+
43+
44+
Notes of particular relevance for developers:
45+
---------------------------------------------
46+
47+
We're going to get rid of the ctsm-docs repo!
48+
49+
50+
Testing summary:
51+
----------------
52+
53+
None, as no code is changing aside from the documentation infrastructure, which is tested in GitHub Workflows.
54+
55+
Other details
56+
-------------
57+
58+
List any git submodules updated (cime, rtm, mosart, cism, fates, etc.):
59+
- doc-builder
60+
61+
Pull Requests that document the changes (include PR ids):
62+
- [Pull Request #3146: ctsm5.3.048: Automatically publish docs to this repo by samsrabin](https://github.com/ESCOMP/CTSM/pull/3146/files)
63+
64+
===============================================================
65+
===============================================================
266
Tag name: ctsm5.3.047
367
Originator(s): samrabin (Sam Rabin, UCAR/TSS)
468
Date: Mon May 26 16:30:10 MDT 2025

doc/ChangeSum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Tag Who Date Summary
22
============================================================================================================================
3+
ctsm5.3.048 samrabin 05/26/2025 Automatically publish docs to this repo
34
ctsm5.3.047 samrabin 05/26/2025 Merge b4b-dev to master
45
ctsm5.3.046 rgknox 05/26/2025 For FATES set itype to ispval and a few unused variables to nan to help prevent future problems
56
ctsm5.3.045 glemieux 05/20/2025 FATES default parameter update for API 40

0 commit comments

Comments
 (0)