-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rljacob/docs/addgh-pages' (PR #5942)
Add infrastructure to build markdown-based documentation located in each components "docs" directory into a single web-page of documentation. Makes use of mkdocs-monorepo-plugin. Also add a skeleton of documentation subdirs and markdown files for EAM, ELM and MOSART. Also add a github action to build and deploy the documentation on e3sm-project.github.io/e3sm whenever master is updated. And an action to build the docs on every PR. [BFB]
- Loading branch information
Showing
23 changed files
with
143 additions
and
75,179 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,39 @@ | ||
name: Build and deploy gh-pages branch with Mkdocs | ||
|
||
on: | ||
# Runs every time master branch is updated | ||
push: | ||
branches: ["master"] | ||
# Runs every time a PR is open against master | ||
pull_request: | ||
branches: ["master"] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# Prevent 2+ copies of this workflow from running concurrently | ||
group: e3sm-docs-action | ||
|
||
jobs: | ||
Build-and-Deploy-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
fetch-depth: 0 # Needed, or else gh-pages won't be fetched, and push rejected | ||
submodules: false # speeds up clone and not building anything in submodules | ||
- name: Show action trigger | ||
run: echo "= The job was automatically triggered by a ${{github.event_name}} event." | ||
- name: Set up Python 3.10 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.10" | ||
- name: Install python deps | ||
run: python3 -m pip install mkdocs-material pymdown-extensions mkdocs-monorepo-plugin mdutils | ||
# build every time (PR or push to master) | ||
- name: Build | ||
run: mkdocs build --strict --verbose | ||
# deploy only when it is a push | ||
- if: ${{ github.event_name == 'push' }} | ||
name: Deploy | ||
run: mkdocs gh-deploy |
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 |
---|---|---|
|
@@ -24,5 +24,8 @@ buildnmlc | |
buildlibc | ||
buildlib_cmakec | ||
|
||
#the site directory | ||
site | ||
|
||
# Ignore emacs backup files | ||
*~ |
Oops, something went wrong.