Skip to content

Commit

Permalink
try again, files should be moved
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed May 23, 2024
1 parent f9db7d9 commit f4a6682
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/buildutils/redirect_generation.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function generate_redirects(rules; dry_run = true)
htmlpaths = cd(joinpath("build", "final_site")) do
htmlpaths = cd("build") do
collect(Iterators.flatmap(walkdir(".")) do (root, dirs, files)
(chop(joinpath(root, file), head = 1, tail = 0) for file in files if endswith(file, ".html"))
end)
Expand Down Expand Up @@ -34,7 +34,7 @@ function write_redirection_html(redirect_file, existing_file; dry_run)

@info "Adding redirect from $redirect_file to $existing_file"
if !dry_run
cd(joinpath("build", "final_site")) do
cd("build") do
filepath = "." * redirect_file
mkpath(splitdir(filepath)[1])
open(filepath, "w") do io
Expand Down
9 changes: 2 additions & 7 deletions docs/makedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,7 @@ Documenter.makedocs(;
pagesonly = true,
)

@show pwd()
run(`ls`)
println()
run(`ls ..`)
println()
cd(@__DIR__)
# DocumenterVitepress moves rendered files from `build/final_site` into `build` on CI by default, but not when running locally

generate_redirects([
r"/reference/blocks/(.*).html" => s"/examples/blocks/\1/index.html",
Expand All @@ -200,4 +195,4 @@ devurl = "dev"

params = deployparameters(; repo, devbranch, devurl, push_preview)

deploy(params; target = "../build/final_site")
deploy(params; target = "build")

0 comments on commit f4a6682

Please sign in to comment.