diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ce5a0b836a61118325853bee59d4de91c78b00c..f6eab8e2515cb5d8e63197fa127e498520ccacbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,6 @@ +variables: + CI: "true" + default: image: julia:latest tags: diff --git a/docs/make.jl b/docs/make.jl index 1733a31ac322b01eb2683487508d671ec9cc0fa0..616c868161229567ad2cc7f6992b35b9af70b403 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -6,13 +6,24 @@ DocMeta.setdocmeta!(MRIBuilder, :DocTestSetup, :(using MRIBuilder); recursive=tr makedocs(; modules=[MRIBuilder], authors="Michiel Cottaar <Michiel.Cottaar@ndcn.ox.ac.uk>", + repo=Remotes.GitLab("git.fmrib.ox.ac.uk", "ndcn0236", "MRIBuilder.jl"), sitename="MRIBuilder.jl", format=Documenter.HTML(; + prettyurls=get(ENV, "CI", "false") == "true", canonical="https://MichielCottaar.gitlab.io/MRIBuilder.jl", edit_link="main", - assets=String[], + description="Documentation for MRIBuilder.jl: an MRI sequence builder in Julia", + footer=nothing, + canonical="https://open.win.ox.ac.uk/pages/ndcn0236/mribuilder.jl/stable/", ), pages=[ "Home" => "index.md", ], + warnonly=Documenter.except(:example_block), ) + +if get(ENV, "CI_COMMIT_REF_NAME", "") == "main" || length(get(ENV, "CI_COMMIT_TAG", "")) > 0 + deploydocs(repo="git.fmrib.ox.ac.uk:ndcn0236/mribuilder.jl.git", branch="pages", devbranch="main") +else + println("Skipping deployment, because we are local or on a secondary branch.") +end \ No newline at end of file