Skip to content

Commit 786f17f

Browse files
committed
Make modifications
1 parent fe99c09 commit 786f17f

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

make-utils.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,15 @@ function copy_tutorial(tutorial_path)
250250
fix_image_path(target_path)
251251
end
252252
end
253-
# index = joinpath(tmp_path, "docs/src/tutorials/index.md")
254-
# cp(index, tutorial_path * "/index.md", force=true)
255253
catch e
256254
rethrow(e)
257255
finally
258256
rm(tmp_path, recursive=true)
259257
end
260258
end
261259

262-
function with_baseurl(func, baseurl)
263-
jekyll_config = joinpath(@__DIR__, "_config.yml")
260+
function with_baseurl(func, baseurl, config_path)
261+
jekyll_config = config_path
264262
lines = readlines(jekyll_config, keep=true)
265263
open(jekyll_config, "w+") do f
266264
for line in lines

make.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ end
2525
package_directory = dirname(dirname(pathof(Turing)))
2626
source_path = joinpath(package_directory, "docs", "src")
2727

28+
# Need to copy all the Turing data into a temp folder
29+
# NOTE: This is where all the built documents will go,
30+
# and it's where the site should ultimately be
31+
# built from.
32+
tmp_path = mktempdir()
33+
2834
# Paths.
29-
build_path = joinpath(package_directory, "_docs")
35+
build_path = joinpath(tmp_path, "_docs")
3036

3137
# Build docs
3238
with_clean_docs(source_path, build_path) do source, build
@@ -41,21 +47,21 @@ end
4147

4248
# You can skip this part if you are on a metered
4349
# connection by calling `julia make.jl no-tutorials`
44-
tutorial_path = joinpath(package_directory, "docs", "_tutorials")
50+
tutorial_path = joinpath(tmp_path, "_tutorials")
4551
in("no-tutorials", ARGS) || copy_tutorial(tutorial_path)
4652

4753
# set default baseurl for the master branch
48-
baseurl = "/" * version
54+
baseurl = "/turing.ml/" * version
4955

5056
@info "" baseurl
5157

5258
# deploy
5359
jekyll_build = joinpath(@__DIR__, "jekyll-build")
54-
with_baseurl(() -> run(`$jekyll_build`), baseurl)
55-
repo = "github.com:TuringLang/turing.ml.git"
60+
with_baseurl(() -> run(`$jekyll_build`), baseurl, joinpath(package_directory, "_config.yml"))
61+
repo = "github.com:cpfiffer/turing.ml.git"
5662

5763
deploy_config = GitHubActions(
58-
"TuringLang/turing.ml", #github_repository::String
64+
"cpfiffer/turing.ml", #github_repository::String
5965
"push", #github_event_name::String
6066
is_dev ? "refs/branch/master" : "refs/tags/$(ARGS[1])" #github_ref::String
6167
)

0 commit comments

Comments
 (0)