-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add doc preview CI #380
Add doc preview CI #380
Conversation
/ok to test |
Looks like we need the org admin to approve another action. Waiting for response. |
Admin has approved. Let's retry... |
/ok to test |
1 similar comment
/ok to test |
/ok to test |
The action worked, but the way we launched it is not right. It couldn't get the PR number, so
|
Discussed with the upstream maintainer (rossjrw/pr-preview-action#101), and unfortunately we'll have to be creative here. Luckily we have most things set up in the doc-build workflow, so we just need to check in the doc artifacts to the |
/ok to test |
4 similar comments
/ok to test |
/ok to test |
/ok to test |
/ok to test |
note to self: when using this API to check the PR number |
/ok to test |
Seems to work now! |
d874d00
to
609caf7
Compare
/ok to test |
1 similar comment
/ok to test |
/ok to test |
/ok to test |
/ok to test |
(PR description updated) |
/ok to test |
/ok to test |
Can anyone approve again? Let's merge and check if the cleanup happens as expected, and then we can use this in other doc PRs. |
|
Verified the clean-up works too! 3db2f0c |
Close #346.
This PR adds a new
doc_preview
action that deploys docs built in each PR toand post a message. Upon PR merge, the action would clean up the pushed files to remove the preview.
The
doc_preview
largely follows the logic ofpr-preview-action
, but has to be re-implemented to cope with two limitations:push
event, not bypull_request
orpull_request_target
events as required bypr-preview-action
pr-preview-action
has no plan to support taking a PR number as an input parameter to bypass the first limitation (see Add doc preview CI #380 (comment))It is understandable why
pull_request*
events are preferred, because withpush
events it is very tricky to get the PR number robustly, both during the PR test stage and during the merge to the main branch, and in the end this is what we need:get-pr-info
provided by nv-gha-runners to get the PR numberlistPullRequestsAssociatedWithCommit
GitHub API to get the PR number