Skip to content

Commit

Permalink
Move current NMDC documentation into new home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Dec 13, 2024
1 parent 56fd930 commit b476473
Show file tree
Hide file tree
Showing 198 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .docker/dev.nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ http {
rewrite ^ $scheme://$http_host/workflows/ redirect;
}

# Current NMDC documentation.
# Home documentation.
location / {
proxy_pass http://nmdc-documentation:8000/;
proxy_pass http://home-docs:8000/;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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
name: Compile home documentation into HTML

on:
push: { branches: [ main ] }
Expand All @@ -17,7 +17,7 @@ jobs:
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
working-directory: content/home
permissions:
contents: read
steps:
Expand All @@ -31,14 +31,14 @@ jobs:
- 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
run: sphinx-build -b html src ${{ github.workspace }}/content/home/_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
name: current-home-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
path: content/home/_build/html
if-no-files-found: error
retention-days: 1 # Note: 1 day is the shortest period possible
10 changes: 5 additions & 5 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +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
compile-home-docs:
name: Compile home documentation
uses: ./.github/workflows/compile-home-docs.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 @@ -33,7 +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
- compile-home-docs
- fetch-and-compile-nmdc-runtime-documentation
- fetch-and-compile-workflow-documentation
runs-on: ubuntu-latest
Expand All @@ -56,7 +56,7 @@ jobs:
_build/html/runtime \
_build/html/workflows
cp -R -T artifacts/legacy-nmdc-documentation-as-html _build/html/legacy
cp -R -T artifacts/current-nmdc-documentation-as-html _build/html
cp -R -T artifacts/home-docs-as-html _build/html
cp -R -T artifacts/nmdc-runtime-documentation-as-html _build/html/runtime
cp -R -T artifacts/workflow-documentation-as-html _build/html/workflows
- name: Inject robots.txt file into assembled website file tree
Expand Down
2 changes: 2 additions & 0 deletions content/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore the web-based documentation generated by Sphinx.
/_build
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion content/nmdc/src/conf.py → content/home/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@
"github_user": "microbiomedata",
"github_repo": "docs",
"github_version": "main",
"conf_py_path": "/content/nmdc/src/", # path to directory containing `conf.py` file
"conf_py_path": "/content/home/src/", # path to directory containing `conf.py` file
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ services:
volumes:
- ./legacy/nmdc-documentation/src:/app/src

nmdc-documentation:
# Use the container image built from `content/nmdc/Dockerfile`.
home-docs:
# Use the container image built from `content/home/Dockerfile`.
build:
context: content/nmdc
context: content/home
dockerfile: Dockerfile
ports:
- "5002:8000"
volumes:
- ./content/nmdc/src:/app/src
- ./content/home/src:/app/src

runtime-documentation:
# Use the container image built from `pullers/runtime_docs/Dockerfile`.
Expand All @@ -40,7 +40,7 @@ services:
restart: unless-stopped
depends_on:
- legacy-nmdc-documentation
- nmdc-documentation
- home-docs
- runtime-documentation
- workflow-documentation
ports:
Expand Down

0 comments on commit b476473

Please sign in to comment.