-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b385812
commit f1b34d1
Showing
2 changed files
with
51 additions
and
21 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 |
---|---|---|
@@ -1,34 +1,62 @@ | ||
using Documenter, Dynare | ||
|
||
# A flag to check if we are running in a GitHub action. | ||
const _IS_GITHUB_ACTIONS = get(ENV, "GITHUB_ACTIONS", "false") == "true" | ||
|
||
# Pass --pdf to build the PDF. On GitHub actions, we always build the PDF. | ||
const _PDF = findfirst(isequal("--pdf"), ARGS) !== nothing || _IS_GITHUB_ACTIONS | ||
_PAGES =[ | ||
"Home" => "index.md", | ||
"Installation and Configuration" => "installation-and-configuration.md", | ||
"Running Dynare" => "running-dynare.md", | ||
"Model File" => [ | ||
"Syntax elements" => "model-file/syntax-elements.md", | ||
"Variables and parameters declaration" => "model-file/variable-declarations.md", | ||
"Model declaration" => "model-file/model-declaration.md", | ||
# "Initial and terminal conditions" => "model-file/initial-terminal-conditions.md", | ||
"Steady state" => "model-file/steady-state.md", | ||
"Shocks on exgogenous variables" => "model-file/shocks.md", | ||
"Deterministic simulations" => "model-file/deterministic-simulations.md", | ||
"Local approximation" => "model-file/local-approxiation.md", | ||
"State space, filtering and smoothing" => "model-file/filtersmoother.md", | ||
"Estimation" => "model-file/estimation.md", | ||
"Forecasting" => "model-file/forecasting.md", | ||
"Reporting"=> "model-file/reporting.md", | ||
# "Optimal policy" => "model-file/optimal-policy.md", | ||
], | ||
"Macroprocessing language" => "macroprocessor.md" | ||
] | ||
|
||
# Needed to make Documenter think that there is a PDF in the right place when | ||
# link checking. Inn production we replace this by running the LaTeX build. | ||
write(joinpath(@__DIR__, "src", "Dynare.pdf"), "") | ||
|
||
makedocs( | ||
sitename="Dynare.jl", | ||
format=Documenter.HTML(; prettyurls=get(ENV, "CI", nothing) == "true"), | ||
# doctest = false, | ||
pages=[ | ||
"Home" => "index.md", | ||
"Installation and Configuration" => "installation-and-configuration.md", | ||
"Running Dynare" => "running-dynare.md", | ||
"Model File" => [ | ||
"Syntax elements" => "model-file/syntax-elements.md", | ||
"Variables and parameters declaration" => "model-file/variable-declarations.md", | ||
"Model declaration" => "model-file/model-declaration.md", | ||
# "Initial and terminal conditions" => "model-file/initial-terminal-conditions.md", | ||
"Steady state" => "model-file/steady-state.md", | ||
"Shocks on exgogenous variables" => "model-file/shocks.md", | ||
"Deterministic simulations" => "model-file/deterministic-simulations.md", | ||
"Local approximation" => "model-file/local-approxiation.md", | ||
"State space, filtering and smoothing" => "model-file/filtersmoother.md", | ||
"Estimation" => "model-file/estimation.md", | ||
"Forecasting" => "model-file/forecasting.md", | ||
"Reporting"=> "model-file/reporting.md", | ||
# "Optimal policy" => "model-file/optimal-policy.md", | ||
], | ||
"Macroprocessing language" => "macroprocessor.md" | ||
], | ||
pages = _PAGES, | ||
pagesonly = true, | ||
|
||
) | ||
|
||
latex_platform = _IS_GITHUB_ACTIONS ? "docker" : "native" | ||
makedocs( | ||
sitename = "Dynare", | ||
format = Documenter.LaTeX(; platform = latex_platform), | ||
build = "latex_build", | ||
pages = _PAGES, | ||
pagesonly = true, | ||
debug = true, | ||
) | ||
# Hack for deploying: copy the pdf (and only the PDF) into the HTML build | ||
# directory! We don't want to copy everything in `latex_build` because it | ||
# includes lots of extraneous LaTeX files. | ||
cp( | ||
joinpath(@__DIR__, "latex_build", "Dynare.pdf"), | ||
joinpath(@__DIR__, "build", "Dynare.pdf"); | ||
force = true, | ||
) | ||
deploydocs( | ||
repo="github.com/DynareJulia/Dynare.jl.git", push_preview=true | ||
) |
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