Skip to content

Commit 907b6fa

Browse files
committed
[docs] Only push previews when all env vars are non-empty
1 parent 19132f8 commit 907b6fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/make.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ deploydocs(
3434
repo = "github.com/NumericalEarth/Breeze.jl",
3535
deploy_repo = "github.com/NumericalEarth/BreezeDocumentation",
3636
devbranch = "main",
37-
push_preview = true,
38-
forcepush = true
37+
# Only push previews if all the relevant environment variables are non-empty. This is an
38+
# attempt to work around https://github.com/JuliaDocs/Documenter.jl/issues/2048.
39+
push_preview = all(!isempty, (get(ENV, "GITHUB_TOKEN", ""), get(ENV, "DOCUMENTER_KEY", ""))),
40+
forcepush = true,
3941
)

0 commit comments

Comments
 (0)