Skip to content

Commit 2cc71ae

Browse files
committed
ci: other strategy to fix deployment paths
1 parent 979aab8 commit 2cc71ae

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/make.jl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ makedocs(;
257257
repo="github.com/MilesCranmer/SymbolicRegression.jl",
258258
devbranch="master",
259259
devurl="dev",
260-
deploy_url=nothing, # Will be handled by post-processing
260+
deploy_url=nothing,
261261
deploy_decision,
262262
build_vitepress=get(ENV, "DOCUMENTER_PRODUCTION", "false") == "true",
263263
md_output_path=if get(ENV, "DOCUMENTER_PRODUCTION", "false") == "true"
@@ -287,6 +287,22 @@ makedocs(;
287287
# This runs after VitePress build to fix any final rendering issues
288288
post_process_vitepress_index()
289289

290+
# Fix bases.txt if it's empty (prevents "no bases suitable for deployment" error)
291+
function fix_empty_bases()
292+
bases_file = joinpath(@__DIR__, "build", "bases.txt")
293+
if isfile(bases_file)
294+
bases = filter(!isempty, readlines(bases_file))
295+
if isempty(bases)
296+
@info "Fixing empty bases.txt for deployment"
297+
open(bases_file, "w") do io
298+
println(io, "dev")
299+
end
300+
end
301+
end
302+
end
303+
304+
fix_empty_bases()
305+
290306
# Fix VitePress base path BEFORE building (moved to before makedocs)
291307

292308
# Additional post-processing for VitePress production build issues

0 commit comments

Comments
 (0)