-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation build script (#158)
Showing
4 changed files
with
48 additions
and
13 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,24 @@ | ||
name: Doc Preview Cleanup | ||
on: | ||
pull_request: | ||
types: [closed] | ||
jobs: | ||
doc-preview-cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
- name: Delete preview and history + push changes | ||
run: | | ||
if [ -d "previews/PR$PRNUM" ]; then | ||
git config user.name "Documenter.jl" | ||
git config user.email "[email protected]" | ||
git rm -rf "previews/PR$PRNUM" | ||
git commit -m "delete preview" | ||
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) | ||
git push --force origin gh-pages-new:gh-pages | ||
fi | ||
env: | ||
PRNUM: ${{ github.event.number }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
WaterModels = "7c60b362-08f4-5b14-8680-cd67a3e18348" | ||
|
||
[compat] | ||
Documenter = "1" |
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 |
---|---|---|
@@ -1,34 +1,41 @@ | ||
using Documenter, WaterModels | ||
import Documenter | ||
import WaterModels | ||
|
||
makedocs( | ||
modules = [WaterModels], | ||
format = Documenter.HTML(analytics="UA-367975-10", mathengine=Documenter.MathJax(), prettyurls=false), | ||
Documenter.makedocs( | ||
sitename = "WaterModels", | ||
authors = "Byron Tasseff and contributors", | ||
format = Documenter.HTML( | ||
analytics = "UA-367975-10", | ||
mathengine = Documenter.MathJax(), | ||
prettyurls = false, | ||
), | ||
pages = [ | ||
"Home" => "index.md", | ||
"Manual" => [ | ||
"Getting Started" => "quickguide.md", | ||
"Network Data Format" => "network-data.md", | ||
"Result Data Format" => "result-data.md", | ||
"Mathematical Models" => "math-model.md" | ||
"Mathematical Models" => "math-model.md", | ||
], | ||
"Library" => [ | ||
"Network Formulations" => "formulations.md", | ||
"Problem Specifications" => "specifications.md", | ||
"Modeling Components" => [ | ||
"Objective" => "objective.md", | ||
"Variables" => "variables.md", | ||
"Constraints" => "constraints.md" | ||
"Constraints" => "constraints.md", | ||
], | ||
"File I/O" => "parser.md" | ||
"File I/O" => "parser.md", | ||
], | ||
"Developer" => "developer.md", | ||
"Examples" => "examples.md" | ||
"Examples" => "examples.md", | ||
], | ||
warnonly = true | ||
clean = true, | ||
modules = [WaterModels], | ||
warnonly = true, | ||
) | ||
|
||
deploydocs( | ||
Documenter.deploydocs( | ||
repo = "github.com/lanl-ansi/WaterModels.jl.git", | ||
push_preview = true, | ||
) |