-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[develop]: Add GitHub Actions to check that Technical Docs are up-to-…
…date (#1152) * Adds a GitHub Actions workflow & script to check whether the Technical Documentation is up-to-date * Turns on the -W flag so that documentation build warnings register as error * Updates the requirements file so that --remove-old flag can be used to check Tech Docs * Updates the Contributor's Guide w/information on Technical Documentation and troubleshooting guidelines * Fixes a few broken links.
- Loading branch information
1 parent
87b26cc
commit be863bc
Showing
11 changed files
with
112 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
# This script recreates technical documentation for the ush and tests/WE2E Python scripts | ||
# If the tech docs produced here do not match the branch's contents, the script will fail | ||
|
||
set -eo pipefail | ||
|
||
# Install prerequisites | ||
pip install sphinx | ||
pip install sphinx-rtd-theme | ||
pip install sphinxcontrib-bibtex | ||
|
||
# Regenerate tech docs in ush and tests/WE2E based on current state of scripts in those directories. | ||
cd doc/TechDocs | ||
sphinx-apidoc -fM --remove-old -o ./ush ../../ush | ||
sphinx-apidoc -fM --remove-old -o ./tests/WE2E ../../tests/WE2E | ||
|
||
# Check for mismatch between what comes out of this action and what is in the PR. | ||
status=`git status -s` | ||
|
||
if [ -n "${status}" ]; then | ||
echo ${status} | ||
echo "" | ||
echo "Please update your Technical Documentation RST files." | ||
exit 1 | ||
else | ||
echo "Technical documentation is up-to-date." | ||
exit 0 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Doc Tests | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- develop | ||
- 'release/*' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
doc_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Check tech docs | ||
run: .github/scripts/check_tech_doc.sh | ||
- name: Build documentation | ||
run: | | ||
cd doc | ||
make doc |
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
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
File renamed without changes.
File renamed without changes.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
sphinx>=6.0.0 | ||
sphinx>=7.4.0 | ||
sphinx_rtd_theme | ||
sphinxcontrib-bibtex | ||
sphinxcontrib-autoyaml |
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