Check for empty CI environment variables #1511
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes
deployconfig.jl
to check thatDOCUMENTER_KEY
,GITHUB_TOKEN
andGITHUB_ACTOR
are non-empty. Currently it only checks if they are defined.Why the current behavior is a problem: Many (most?) Julia packages configure CI with the following in the docs job:
(That's what's generated by PkgTemplates and suggested by the Documenter manual.)
This means that deploys don't work with the initial configuration: both variables are defined, but
DOCUMENTER_KEY
will be empty unless/until the user configures the secret. At deploy time, Documenter gives priority toDOCUMENTER_KEY
so the deploy will fail.With this PR, Documenter will fall back to
GITHUB_TOKEN
whenDOCUMENTER_KEY
is empty, so deploys work "out of the box" since the token is always defined.The PR also includes small docs change:
push_review
doesn't work from forksGITHUB_TOKEN
andDOCUMENTER_KEY
are not necessarily both needed