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.
PR #575 modified the GitHub checkout associated with the preview action; in doing so, it inadvertently broke previews. This is because the CI action triggers on
pull_request_target
, notpull_request
.pull_request_target
defaults to checking out the SHA of the branch base, not the head.We have to use
pull_request_target
for security reasons; if apull_request
trigger is used, malicious code could alter the repository or exfiltrate secrets.This takes a different approach to the code removed by #575, explicitly naming the SHA of the PR branch, rather than referencing the PR as an indirect reference. Using the PR number as a proxy is potentially insecure as the PR itself could be modified.
To prove the preview is working, the PR modifies the label of the first entry on the https://beeware.org/news/events/ page. This is a change that is also made by #579.
PR Checklist: