Skip to content

Commit

Permalink
Update home page to link to non-legacy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Nov 20, 2024
1 parent 7184b91 commit adb91f7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/compile-current-nmdc-documentation.yml
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
5 changes: 5 additions & 0 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
compile-legacy-nmdc-documentation:
name: Compile legacy NMDC documentation
uses: ./.github/workflows/compile-legacy-nmdc-documentation.yml
compile-current-nmdc-documentation:
name: Compile current NMDC documentation
uses: ./.github/workflows/compile-current-nmdc-documentation.yml
fetch-and-compile-nmdc-runtime-documentation:
name: Fetch and compile NMDC Runtime documentation
uses: ./.github/workflows/fetch-and-compile-nmdc-runtime-documentation.yml
Expand All @@ -30,6 +33,7 @@ jobs:
# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds
needs:
- compile-legacy-nmdc-documentation
- compile-current-nmdc-documentation
- fetch-and-compile-nmdc-runtime-documentation
- fetch-and-compile-mag-workflow-documentation
runs-on: ubuntu-latest
Expand All @@ -47,6 +51,7 @@ jobs:
ls -R artifacts
mkdir -p _build/html _build/html/legacy _build/html/workflows
cp -R artifacts/legacy-nmdc-documentation-as-html _build/html/legacy/nmdc-documentation
cp -R artifacts/current-nmdc-documentation-as-html _build/html/nmdc
cp -R artifacts/nmdc-runtime-documentation-as-html _build/html/nmdc-runtime-documentation
cp -R artifacts/mag-workflow-documentation-as-html _build/html/workflows/mag-workflow-documentation
cp -R content/assets _build/html/assets
Expand Down
9 changes: 7 additions & 2 deletions content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,17 @@ <h4 class="card-title h5">Running bioinformatics workflows</h4>
<div class="card-body">
<h4 class="card-title h5">Other stuff</h4>
<p class="card-text">
Explore documentation produced during earlier phases of the project.
Read tutorials, how-to guides, references, and explanations of various aspects of the NMDC.
</p>
<ul class="list-group">
<li class="list-group-item">
<a href="nmdc/index.html">
General documentation
</a>
</li>
<li class="list-group-item">
<a href="legacy/nmdc-documentation/index.html">
Legacy documentation
Legacy platform documentation
</a>
</li>
</ul>
Expand Down

0 comments on commit adb91f7

Please sign in to comment.