Skip to content

Commit

Permalink
[docs] Fix remotes argument to makedocs (#3526)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Sep 25, 2023
1 parent 25f8d4d commit 78e6744
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
)

# ==============================================================================
Expand Down

0 comments on commit 78e6744

Please sign in to comment.