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

オープン
#1,042 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@ocots がすでに取り組んでいます。

2026年11月7日 から。

評価

この issue はまだ評価されていません。

説明

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

主要言語
Julia
スター
135
フォーク
11
平均マージ
7時間 49分
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

control-toolbox/OptimalControl.jl のほかの issue

control-toolbox/OptimalControl.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。