Skip to content

Commit 979aab8

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

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

docs/make.jl

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,6 @@ function preprocess_source_index()
179179
return true
180180
end
181181

182-
# Run preprocessing on source files before makedocs()
183-
preprocess_source_index()
184-
185182
# Fix VitePress base path for dual deployment
186183
function fix_vitepress_base_path()
187184
deployment_target = get(ENV, "DEPLOYMENT_TARGET", "astroautomata")
@@ -193,14 +190,8 @@ function fix_vitepress_base_path()
193190
"/SymbolicRegression.jl/dev/"
194191
end
195192

196-
# Find and fix VitePress config files
197-
is_production = get(ENV, "DOCUMENTER_PRODUCTION", "false") == "true"
198-
build_subdir = is_production ? "1" : "."
199-
200-
config_paths = [
201-
joinpath(@__DIR__, "build", ".documenter", ".vitepress", "config.mts"),
202-
joinpath(@__DIR__, "build", build_subdir, ".vitepress", "config.mts"),
203-
]
193+
# Find and fix VitePress SOURCE config file (before build)
194+
config_paths = [joinpath(@__DIR__, "src", ".vitepress", "config.mts")]
204195

205196
for config_path in config_paths
206197
if isfile(config_path)
@@ -219,6 +210,12 @@ function fix_vitepress_base_path()
219210
end
220211
end
221212

213+
# Run preprocessing on source files before makedocs()
214+
preprocess_source_index()
215+
216+
# Fix VitePress base path BEFORE makedocs() - this is crucial for timing!
217+
fix_vitepress_base_path()
218+
222219
# Configure deployment based on target
223220
deployment_target = get(ENV, "DEPLOYMENT_TARGET", "astroautomata")
224221

@@ -290,8 +287,7 @@ makedocs(;
290287
# This runs after VitePress build to fix any final rendering issues
291288
post_process_vitepress_index()
292289

293-
# Fix VitePress base path for dual deployment
294-
fix_vitepress_base_path()
290+
# Fix VitePress base path BEFORE building (moved to before makedocs)
295291

296292
# Additional post-processing for VitePress production build issues
297293
function fix_vitepress_production_output()

docs/src/.vitepress/config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function getBaseRepository(base: string): string {
1010
}
1111

1212
const baseTemp = {
13-
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',// TODO: replace this in makedocs!
13+
base: '/symbolicregression/dev/',// TODO: replace this in makedocs!
1414
}
1515

1616
const navTemp = {
@@ -26,7 +26,7 @@ const nav = [
2626

2727
// https://vitepress.dev/reference/site-config
2828
export default defineConfig({
29-
base: 'REPLACE_ME_DOCUMENTER_VITEPRESS',// TODO: replace this in makedocs!
29+
base: '/symbolicregression/dev/',// TODO: replace this in makedocs!
3030
title: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
3131
description: 'REPLACE_ME_DOCUMENTER_VITEPRESS',
3232
lastUpdated: true,

0 commit comments

Comments
 (0)