diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 9a8eba7..f1cf8f0 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -10,17 +10,18 @@ on: jobs: build: - name: "Build the documentation" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest with: - version: '1.9' - - uses: julia-actions/julia-buildpkg@latest + version: '1.11' - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + env: + GKSwstype: nul - name: Build and deploy env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} # For authentication with GitHub Actions token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GKSwstype: nul run: julia --project=docs/ docs/make.jl diff --git a/docs/Project.toml b/docs/Project.toml index 7416adf..28c0d2f 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,4 +1,7 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8" +DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365" +NeutralLandscapes = "71847384-8354-4223-ac08-659a5128069f" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" diff --git a/docs/make.jl b/docs/make.jl index c8cb164..5803657 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,37 +1,26 @@ -using Documenter, NeutralLandscapes -import Literate +push!(LOAD_PATH, "../src/") -# For GR docs bug -ENV["GKSwstype"] = "100" - -vignettes = filter( - endswith(".jl"), - readdir(joinpath(@__DIR__, "src", "vignettes"); join = true, sort = true), -) -for vignette in vignettes - Literate.markdown( - vignette, - joinpath(@__DIR__, "src", "vignettes"); - config = Dict("credit" => false, "execute" => true), - ) -end +using Documenter +using DocumenterCitations +using DocumenterVitepress +using NeutralLandscapes makedocs(; - sitename = "NeutralLandscapes", - authors = "M.D. Catchen", - modules = [NeutralLandscapes], - pages = [ + sitename="NeutralLandscapes", + authors="M.D. Catchen", + modules=[NeutralLandscapes], + pages=[ "Index" => "index.md", "Gallery" => "gallery.md", - "Vignettes" => [ - "Overview" => "vignettes/overview.md", - ], ], - checkdocs = :all, + format = DocumenterVitepress.MarkdownVitepress( + repo="https://github.com/EcoJulia/NeutralLandscapes.jl", + devurl="dev" + ), + warnonly=true ) deploydocs( repo="github.com/EcoJulia/NeutralLandscapes.jl.git", - devbranch="main", push_preview=true )