From 91f9bb9f61306df7687782f684d63ea79559451f Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Fri, 20 Sep 2024 17:03:48 -0700 Subject: [PATCH] reorder deploy script constant definitions --- helpers/deploy_with_preview.jl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/helpers/deploy_with_preview.jl b/helpers/deploy_with_preview.jl index de1b392..27458e6 100644 --- a/helpers/deploy_with_preview.jl +++ b/helpers/deploy_with_preview.jl @@ -16,6 +16,16 @@ cfg = (; github_repository, github_event_name, github_ref) io = stdout + +# Here we know that the site builds to `docs/`, +# but you could customize this directory in the future. +target_dir = abspath("./docs") # builddir +upstream = "https://github.com/geocompx/geocompjl.git" +branch = "gh-pages" +devbranch = "main" + + + if cfg.github_event_name == "pull_request" build_type = :preview elseif occursin(r"^refs\/tags\/(.*)$", cfg.github_ref) @@ -66,14 +76,6 @@ if !all_ok exit(0) end -# Here we know that the site builds to `docs/`, -# but you could customize this directory in the future. -target_dir = abspath("./docs") # builddir -upstream = "https://github.com/geocompx/geocompjl.git" -branch = "gh-pages" -devbranch = "main" - - sha = cd(dirname(@__DIR__)) do # Find the commit sha. # We'll make sure we run the git commands in the source directory (root), in case