JuliaDocs/Documenter.jl

Documentation previews not deployed using v1

Open

#2,278 opened on Sep 21, 2023

 (6 comments) (0 reactions) (0 assignees)Julia (513 forks)batch import
Type: Enhancementhelp wanted

Repository metrics

Stars
 (910 stars)
PR merge metrics
 (Avg merge 16d 9h) (3 merged PRs in 30d)

Description

After updating Documenter to v1 documentation previews of PRs are no longer deployed:

 Warning: GITHUB_TOKEN is missing, unable to verify if PR comes from destination repository -- assuming it doesn't.
└ @ Documenter ~/.julia/packages/Documenter/Meee1/src/deployconfig.jl:518
┌ Info: Deployment criteria for deploying preview build from GitHub Actions:
│ - ✔ ENV["GITHUB_REPOSITORY"]="github.com/Hirlam/HarmonieSystemDocumentation.git" occurs in repo="github.com/Hirlam/HarmonieSystemDocumentation.git"
│ - ✔ ENV["GITHUB_REF"] corresponds to a PR number
│ - ✘ PR originates from the same repository
│ - ✔ `push_preview` keyword argument to deploydocs is `true`
│ - ✔ ENV["GITHUB_ACTOR"] exists and is non-empty
│ - ✔ ENV["DOCUMENTER_KEY"] exists and is non-empty
└ Deploying: ✘

The setup is perhaps slightly non-standard because the github action is running in github.com/Hirlam/Harmonie (a private repo) but documentation should be public so the html pages are deployed to github.com/Hirlam/HarmonieSystemDocumentation.git in make.jl by:

withenv("GITHUB_REPOSITORY" => "github.com/Hirlam/HarmonieSystemDocumentation.git") do 
    deploydocs(
        repo = "github.com/Hirlam/HarmonieSystemDocumentation.git",
        devbranch = "dev-CY46h1",   
        devurl = "dev",       
        push_preview=true
    )
end 

This worked in v0.27. I am using a DOCUMENTER_KEY secret in Hirlam/Harmonie and a Documenter Deploy key in Hirlam/HarmonieSystemDocumentation

Contributor guide