-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve pull requests: additional instructions #32
Conversation
We can only publish PR previews from the original repository. The action fails when the PR originates from a forked repository. For details, see rossjrw/pr-preview-action#3.
|
@EamonConway are you happy for me to merge this? By not attempting to publish online previews for PRs outside of this repository, we can avoid CI failures in PRs from forks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a single comment for me.
If i am wrong please let me know and I am happy for a merge.
- name: Deploy preview | ||
if: github.event.pull_request.head.repo.full_name == github.repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected github.event.pull_request.head.repo.full_name and github.repository to be wrapped in ${{}}.
Is this not the case?
I could not think of a way to check this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good question! I don't think I noted precisely where I found this solution, but this discussion demonstrates that it works. A newer comment suggests an alternative solution. But yeah, the only way I can think to test this is to try to fork this branch and then submit a PR? And I'm not 100% sure that would actually test this feature ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much Eamon!
We discovered with #31 that we cannot publish PR previews from forked repositories, and we also need to highlight that new files must be added to the table of contents in
src/SUMMARY.md
.