@@ -339,7 +339,10 @@ struct BuildBotConfig <: Documenter.DeployConfig end
339339Documenter. authentication_method (:: BuildBotConfig ) = Documenter. HTTPS
340340Documenter. authenticated_repo_url (:: BuildBotConfig ) = " https://github.com/JuliaLang/docs.julialang.org.git"
341341function Documenter. deploy_folder (:: BuildBotConfig ; devurl, repo, branch, kwargs... )
342- haskey (ENV , " DOCUMENTER_KEY" ) || return Documenter. DeployDecision (; all_ok= false )
342+ if ! haskey (ENV , " DOCUMENTER_KEY" )
343+ @info " Unable to deploy the documentation: DOCUMENTER_KEY missing"
344+ return Documenter. DeployDecision (; all_ok= false )
345+ end
343346 if Base. GIT_VERSION_INFO. tagged_commit
344347 # Strip extra pre-release info (1.5.0-rc2.0 -> 1.5.0-rc2)
345348 ver = VersionNumber (VERSION . major, VERSION . minor, VERSION . patch,
@@ -349,6 +352,11 @@ function Documenter.deploy_folder(::BuildBotConfig; devurl, repo, branch, kwargs
349352 elseif Base. GIT_VERSION_INFO. branch == " master"
350353 return Documenter. DeployDecision (; all_ok= true , repo, branch, subfolder= devurl)
351354 end
355+ @info """
356+ Unable to deploy the documentation: invalid GIT_VERSION_INFO
357+ GIT_VERSION_INFO.tagged_commit: $(Base. GIT_VERSION_INFO. tagged_commit)
358+ GIT_VERSION_INFO.branch: $(Base. GIT_VERSION_INFO. branch)
359+ """
352360 return Documenter. DeployDecision (; all_ok= false )
353361end
354362
@@ -376,12 +384,16 @@ function Documenter.Writers.HTMLWriter.expand_versions(dir::String, v::Versions)
376384 return Documenter. Writers. HTMLWriter. expand_versions (dir, v. versions)
377385end
378386
379- deploydocs (
380- repo = " github.com/JuliaLang/docs.julialang.org.git" ,
381- deploy_config = BuildBotConfig (),
382- target = joinpath (buildroot, " doc" , " _build" , " html" , " en" ),
383- dirname = " en" ,
384- devurl = devurl,
385- versions = Versions ([" v#.#" , devurl => devurl]),
386- archive = get (ENV , " DOCUMENTER_ARCHIVE" , nothing ),
387- )
387+ if " deploy" in ARGS
388+ deploydocs (
389+ repo = " github.com/JuliaLang/docs.julialang.org.git" ,
390+ deploy_config = BuildBotConfig (),
391+ target = joinpath (buildroot, " doc" , " _build" , " html" , " en" ),
392+ dirname = " en" ,
393+ devurl = devurl,
394+ versions = Versions ([" v#.#" , devurl => devurl]),
395+ archive = get (ENV , " DOCUMENTER_ARCHIVE" , nothing ),
396+ )
397+ else
398+ @info " Skipping deployment ('deploy' not passed)"
399+ end
0 commit comments