-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update home page to link to non-legacy documentation
- Loading branch information
Showing
3 changed files
with
56 additions
and
2 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,44 @@ | ||
# This GitHub Actions workflow compiles the Sphinx documentation into web-based documentation. | ||
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions | ||
name: Compile current NMDC documentation into HTML | ||
|
||
on: | ||
push: { branches: [ main ] } | ||
workflow_dispatch: { } | ||
# Allow this workflow to be called by other workflows. | ||
# Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
workflow_call: { } | ||
|
||
jobs: | ||
compile: | ||
name: Compile | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
# Set a default working directory for all `run` steps in this job. | ||
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun | ||
working-directory: content/nmdc | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Check out commit # Docs: https://github.com/actions/checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python # Docs: https://github.com/actions/setup-python | ||
uses: actions/setup-python@v5 | ||
with: { python-version: '3.12' } | ||
- name: Install Sphinx # Docs: https://pypi.org/project/Sphinx/ | ||
run: pip install Sphinx | ||
- name: Install other dependencies | ||
run: pip install -r requirements.txt | ||
- name: Compile source documents into HTML | ||
run: sphinx-build -b html src ${{ github.workspace }}/content/nmdc/_build/html | ||
# Upload the result as an "artifact" so it can then be downloaded and used by another job. | ||
- name: Save the HTML for publishing later # Docs: https://github.com/actions/upload-artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: current-nmdc-documentation-as-html | ||
# Note: Relative `path` values here are relative to the _workspace_, not to the current working directory. | ||
# Reference: https://github.com/actions/upload-artifact/pull/477#issue-2044900649 | ||
path: content/nmdc/_build/html | ||
if-no-files-found: error | ||
retention-days: 1 # Note: 1 day is the shortest period possible |
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