-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add markdown doc structure and gh-pages workflow #5942
Merged
rljacob
merged 18 commits into
E3SM-Project:master
from
rljacob:rljacob/docs/addgh-pages
Sep 22, 2023
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5f22a71
Add an index.md file
rljacob 73cef25
Add basic mkdocs.yaml file
rljacob 63edd77
Tell .gitignore to ignore the site dir
rljacob 0213140
Add gh-pages build and publish workflow
rljacob e974b5c
Add skeleton for ELM
rljacob f2aa4ea
Add more basic structure for ELM docs
rljacob d945092
Add tech and dev to ELM index
rljacob 65c6976
Remove out-of-date eam/doc dir
rljacob 5c23495
Add EAM documentation skeleton
rljacob 433c4f3
Add themes and extensions
rljacob 24bdb5e
Add docs skeleton for MOSART
rljacob 716ebbe
Change Intro to Introduction
rljacob 1a37666
Update repo in gh-pages
rljacob 2271d8a
Add more installs to workflow.
rljacob 19e571e
Apply suggestions from code review
rljacob 97092c8
Rename gh-pages workflow file
rljacob a1e0c08
Remove submodule checkout in pages workflow
rljacob 7e3658e
Don't specify repo/branch to check out
rljacob 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 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point we may want to use another action for deployment, which will get rid of the need for
fetch-depth: 0
. E.g., in scream repo we useJamesIves/github-pages-deploy-action@v4
, which plays nicely withrossjrw/pr-preview-action@v1
, which we use to deploy preview of PR docs.As it is now, if running on a PR, this action only builds the docs but does not show it anywhere. We can merge as is, but I would soon work on making a preview of docs available on the PR page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes lets do that in a later PR.