Add docs-check-links.yml and docs-check-links.sh files in .github/workflows#3831
Add docs-check-links.yml and docs-check-links.sh files in .github/workflows#3831slevis-lmwg wants to merge 3 commits intoESCOMP:b4b-devfrom
Conversation
|
@samsrabin I introduced these two files using check-clm6-aliases as a template. I doubt that what I did works so far. When you have a chance:
When I'm ready to test this, would I make a change to an .rst file in the documentation and push to the PR? |
Yes!
for $URL in $list_of_found_urls; do
link_code="$(curl -s -o /dev/null -w "%{http_code}" $URL)"
# Add code to save bad links to one or more arrays
...
done
# Throw error or success message
...I leave it to you to figure out how best to find all URLs.
The first thing to test will be that your |
ekluzek
left a comment
There was a problem hiding this comment.
This looks good to me. I can't see anything to comment on.
|
Ahh, @slevis-lmwg @samsrabin has some good comments above that would be good to bring in before merging. It would be good to have the docs workflows in one place. |
|
OH, actually: It looks like there should be a built-in Sphinx link checker! https://sphinx-intro-tutorial.readthedocs.io/en/latest/sphinx_extensions.html#linkcheck But I think I'd need to update doc-builder for that. |
Description of changes
Add github workflow to check whether links in the documentation still work.
Specific notes
Contributors other than yourself, if any:
@samsrabin
CTSM Issues Fixed (include github issue #):
Fixes #3218
Are answers expected to change (and if so in what way)?
No
Any User Interface Changes (namelist or namelist defaults changes)?
No
Does this create a need to change or add documentation? Did you do so?
?, no
Testing performed, if any:
None, yet