-
Notifications
You must be signed in to change notification settings - Fork 210
Deploy documentation to RTD #1264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
WalterKolczynski-NOAA
merged 13 commits into
NOAA-EMC:develop
from
aerorahul:feature/deploy-documentation
Jan 23, 2023
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cd4dda9
disable failing pytest till I can figure out what why it fails on git…
aerorahul eb9afa2
build and deploy RTD documentation automation
aerorahul 074912f
make build_docs.sh executable
aerorahul 35620be
fix workflow yaml;
aerorahul 3a1caae
Merge branch 'hotfix/disable-failing-pytest' into feature/deploy-docu…
aerorahul 47943d6
Merge branch 'develop' into feature/deploy-documentation
aerorahul 2bb19f8
fix errors in the checkout space and paths
aerorahul 4ea8e70
install missing bibtex
aerorahul 3fa6253
nth time is the charm
aerorahul 827f564
for crying out loud, shell checker
aerorahul ae3320d
try again
aerorahul 335dd26
Do not exit when warnings are encountered in building documentation
aerorahul 3867f79
Update README.md
aerorahul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,31 @@ | ||
| #! /bin/bash | ||
|
|
||
| set -eux | ||
|
|
||
| # path to docs directory relative to top level of repository | ||
| # $GITHUB_WORKSPACE is set if the actions/checkout@v3 action is run first | ||
|
|
||
| cwd=$(pwd) | ||
| DOCS_DIR="${GITHUB_WORKSPACE}/docs" | ||
|
|
||
| # run Make to build the documentation and return to previous directory | ||
| cd "${DOCS_DIR}" | ||
| make clean html | ||
| cd "${cwd}" | ||
|
|
||
| # copy HTML output into directory to create an artifact | ||
| mkdir -p artifact/documentation | ||
| cp -R "${DOCS_DIR}/build/html/." artifact/documentation | ||
|
|
||
| # check if the warnings.log file is empty | ||
| # Copy it into the artifact and documeentation directories | ||
| # so it will be available in the artifacts | ||
| warning_file="${DOCS_DIR}/build/warnings.log" | ||
| if [[ -s ${warning_file} ]]; then | ||
| cp -r "${DOCS_DIR}/build/warnings.log" artifact/doc_warnings.log | ||
| cp artifact/doc_warnings.log artifact/documentation | ||
| echo "Warnings were encountered while building documentation." | ||
| echo "========== Begin warnings ==========" | ||
| cat artifact/doc_warnings.log | ||
| echo "=========== End warnings ===========" | ||
| fi |
This file contains hidden or 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,51 @@ | ||
| name: Build and Deploy Documentation | ||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| - feature/* | ||
| - main/* | ||
| - bugfix/* | ||
| - release/* | ||
| paths: | ||
| - docs/** | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
|
|
||
| jobs: | ||
| documentation: | ||
| runs-on: ubuntu-latest | ||
| name: Build and deploy documentation | ||
|
|
||
| steps: | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.9" | ||
|
|
||
| - name: Install (upgrade) python dependencies | ||
| run: | | ||
| pip install --upgrade pip sphinx sphinx-gallery sphinx_rtd_theme sphinxcontrib-bibtex | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Build documentation | ||
| run: | | ||
| ./.github/scripts/build_docs.sh | ||
|
|
||
| - name: Upload documentation (on success) | ||
| uses: actions/upload-artifact@v3 | ||
| if: always() | ||
| with: | ||
| name: documentation | ||
| path: artifact/documentation | ||
|
|
||
| - name: Upload warnings (on failure) | ||
| uses: actions/upload-artifact@v3 | ||
| if: failure() | ||
| with: | ||
| name: documentation_warnings.log | ||
| path: artifact/doc_warnings.log | ||
| if-no-files-found: ignore | ||
|
|
||
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.