[Doc] A pull request without the preview label announces a deployment that never happens

Aperta
#1,042 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ocots ci sta già lavorando.

Dal 7/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

documentation

Written by Claude (Claude Code) at the request of ocots.

Problem

On a pull request labelled run documentation but not documentation push preview, the documentation job announces a deployment that never happens:

DOCUMENTER_PUSH_PREVIEW: false
┌ Info: Deployment criteria for deploying preview build from GitHub Actions:
│ - ✔ `push_preview` keyword argument to deploydocs is `true`
└ Deploying: ✔
[ Info: Bases that will be built: ["previews/PR<n>"]
[ Info: Deploying docs for base "previews/PR<n>" from build/1
│ - ✘ `push_preview` keyword argument to deploydocs is `true`
└ Deploying: ✘

DocumenterVitepress.MarkdownVitepress decides where the site goes during makedocs. Given no deploy_decision, it computes one with push_preview=true hard-coded (DocumenterVitepress 0.3, src/writer.jl, render); the label only reaches deploydocs. Found in control-toolbox/OptimalControlProblems.jl#410.

Fix

Apply SITE13 as tightened in ct-conventions v0.11.0 (control-toolbox/ct-conventions#54): in docs/make.jl,

push_preview = get(ENV, "DOCUMENTER_PUSH_PREVIEW", "false") == "true"
deploy_decision = Documenter.deploy_folder(
    Documenter.auto_detect_deploy_system();
    repo=repo_url, devbranch="main", devurl="dev", push_preview=push_preview,
)
# MarkdownVitepress(; …, deploy_decision=deploy_decision)

bases_file = joinpath(@__DIR__, "build", "bases.txt")
if !deploy_decision.all_ok
    reason = if get(ENV, "GITHUB_EVENT_NAME", "") == "pull_request" && !push_preview
        "no preview requested (label `documentation push preview` absent)"
    else
        "the deployment criteria above are not met"
    end
    @info "Skipping deployment: $(reason)."
elseif !isfile(bases_file)
    @info "Skipping deployment: no bases were built (prerelease with existing higher stable release)."
else
    DocumenterVitepress.deploydocs(; repo=repo_url * ".git", devbranch="main", push_preview=push_preview)
end

Use the repo, devbranch and devurl this make.jl already passes to MarkdownVitepress. Reference implementation: control-toolbox/OptimalControlProblems.jl#411. Pin ct-conventions v0.11.0 in AGENTS.md once it is released.

Done when

  • A pull request with run documentation only builds without announcing a deployment, and says why it does not deploy.
  • With documentation push preview, the preview is built for previews/PR<n> and deployed.
  • A push to main still deploys dev.

🤖 Generated with Claude Code

Lingua principale
Julia
Stelle
135
Fork
11
Merge medio
7h 49m
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di control-toolbox/OptimalControl.jl

Tutte le issue di control-toolbox/OptimalControl.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.