@@ -5,6 +5,8 @@ using Documenter, Literate
55using Pkg
66
77# Literate Examples
8+ const DRAFT = get (ENV , " DRAFT" , " false" ) == " true"
9+ @show DRAFT
810const EXAMPLE_DIR = pkgdir (TensorInference, " examples" )
911const LITERATE_GENERATED_DIR = pkgdir (TensorInference, " docs" , " src" , " generated" )
1012mkpath (LITERATE_GENERATED_DIR)
@@ -19,7 +21,7 @@ for each in readdir(EXAMPLE_DIR)
1921 # build
2022 input_file = joinpath (workdir, " main.jl" )
2123 @info " building" input_file
22- Literate. markdown (input_file, workdir; execute= true )
24+ Literate. markdown (input_file, workdir; execute= ! DRAFT )
2325 # restore environment
2426 # Pkg.activate(Pkg.PREV_ENV_PATH[])
2527end
@@ -30,7 +32,7 @@ for each in EXTRA_JL
3032 cp (joinpath (SRC_DIR, each), joinpath (LITERATE_GENERATED_DIR, each); force= true )
3133 input_file = joinpath (LITERATE_GENERATED_DIR, each)
3234 @info " building" input_file
33- Literate. markdown (input_file, LITERATE_GENERATED_DIR; execute= true )
35+ Literate. markdown (input_file, LITERATE_GENERATED_DIR; execute= ! DRAFT )
3436end
3537
3638DocMeta. setdocmeta! (TensorInference, :DocTestSetup , :(using TensorInference); recursive= true )
@@ -68,6 +70,7 @@ makedocs(;
6870 ],
6971 doctest = false ,
7072 warnonly = :missing_docs ,
73+ draft = DRAFT,
7174)
7275
7376deploydocs (;
0 commit comments