@@ -343,7 +343,10 @@ struct BuildBotConfig <: Documenter.DeployConfig end
343343Documenter. authentication_method (:: BuildBotConfig ) = Documenter. HTTPS
344344Documenter. authenticated_repo_url (:: BuildBotConfig ) = " https://github.com/JuliaLang/docs.julialang.org.git"
345345function Documenter. deploy_folder (:: BuildBotConfig ; devurl, repo, branch, kwargs... )
346- haskey (ENV , " DOCUMENTER_KEY" ) || return Documenter. DeployDecision (; all_ok= false )
346+ if ! haskey (ENV , " DOCUMENTER_KEY" )
347+ @info " Unable to deploy the documentation: DOCUMENTER_KEY missing"
348+ return Documenter. DeployDecision (; all_ok= false )
349+ end
347350 if Base. GIT_VERSION_INFO. tagged_commit
348351 # Strip extra pre-release info (1.5.0-rc2.0 -> 1.5.0-rc2)
349352 ver = VersionNumber (VERSION . major, VERSION . minor, VERSION . patch,
@@ -353,6 +356,11 @@ function Documenter.deploy_folder(::BuildBotConfig; devurl, repo, branch, kwargs
353356 elseif Base. GIT_VERSION_INFO. branch == " master"
354357 return Documenter. DeployDecision (; all_ok= true , repo, branch, subfolder= devurl)
355358 end
359+ @info """
360+ Unable to deploy the documentation: invalid GIT_VERSION_INFO
361+ GIT_VERSION_INFO.tagged_commit: $(Base. GIT_VERSION_INFO. tagged_commit)
362+ GIT_VERSION_INFO.branch: $(Base. GIT_VERSION_INFO. branch)
363+ """
356364 return Documenter. DeployDecision (; all_ok= false )
357365end
358366
@@ -380,12 +388,16 @@ function Documenter.Writers.HTMLWriter.expand_versions(dir::String, v::Versions)
380388 return Documenter. Writers. HTMLWriter. expand_versions (dir, v. versions)
381389end
382390
383- deploydocs (
384- repo = " github.com/JuliaLang/docs.julialang.org.git" ,
385- deploy_config = BuildBotConfig (),
386- target = joinpath (buildroot, " doc" , " _build" , " html" , " en" ),
387- dirname = " en" ,
388- devurl = devurl,
389- versions = Versions ([" v#.#" , devurl => devurl]),
390- archive = get (ENV , " DOCUMENTER_ARCHIVE" , nothing ),
391- )
391+ if " deploy" in ARGS
392+ deploydocs (
393+ repo = " github.com/JuliaLang/docs.julialang.org.git" ,
394+ deploy_config = BuildBotConfig (),
395+ target = joinpath (buildroot, " doc" , " _build" , " html" , " en" ),
396+ dirname = " en" ,
397+ devurl = devurl,
398+ versions = Versions ([" v#.#" , devurl => devurl]),
399+ archive = get (ENV , " DOCUMENTER_ARCHIVE" , nothing ),
400+ )
401+ else
402+ @info " Skipping deployment ('deploy' not passed)"
403+ end
0 commit comments