From 78e674463adbad5b562104b336b13735c585874d Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 25 Sep 2023 13:48:42 +1300 Subject: [PATCH] [docs] Fix remotes argument to makedocs (#3526) --- .github/workflows/documentation.yml | 6 +++++- docs/make.jl | 11 +++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index feb636f1ffd..34e5cec64c2 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,7 +16,11 @@ jobs: with: version: '1' - name: Install dependencies - run: julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.develop("MathOptInterface"); Pkg.instantiate()' + shell: julia --color=yes --project=docs/ {0} + run: | + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() - name: Build and deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token diff --git a/docs/make.jl b/docs/make.jl index 69c98b4766d..67f9a0b4136 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -541,6 +541,12 @@ Documenter.DocMeta.setdocmeta!( # link checking. Inn production we replace this by running the LaTeX build. write(joinpath(@__DIR__, "src", "JuMP.pdf"), "") +# Create remotes for Documenter +status = sprint(io -> Pkg.status("MathOptInterface"; io = io)) +version = match(r"(v[0-9].[0-9]+.[0-9]+)", status)[1] +gh_moi = Documenter.Remotes.GitHub("jump-dev", "MathOptInterface.jl") +remotes = Dict(pkgdir(MOI) => (gh_moi, version)) + @time Documenter.makedocs( sitename = "JuMP", authors = "The JuMP core developers and contributors", @@ -572,10 +578,7 @@ write(joinpath(@__DIR__, "src", "JuMP.pdf"), "") # Skip doctests if --fast provided. doctest = _FIX ? :fix : !_FAST, pages = vcat(_PAGES, "release_notes.md"), - remotes = Dict( - dirname(dirname(pathof(MOI))) => - Documenter.Remotes.GitHub("jump-dev", "MathOptInterface.jl"), - ), + remotes = remotes, ) # ==============================================================================