-
Notifications
You must be signed in to change notification settings - Fork 445
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
Fix: PR Preview URL to Use Base Repository #4855
Conversation
Note: Changes may take a few seconds to appear on GitHub Pages. Please refresh the page if you do not see the updates immediately. |
@AdarshRawat1 The current preview is broken because it uses the PR users URL, the p4lang. |
Yes @fruffy you are right, this PR fixes the same. |
So the Github actions comment above is stale and does not use the changes? |
Thanks @fruffy for catching that! |
After updating the Domain to p4lang the workflow gets updated , but the workflow is using reference of the user who initiated the build. This mean that it is running stale workflow... |
Let me try. I can rebase this branch and then check whether the URL changes. If that is the case we can merge and try with the next PR. It's a little strange though, it should use the active Github action... |
Signed-off-by: Adarsh <Adarshbunny293@gmail.com>
Signed-off-by: Adarsh <Adarshbunny293@gmail.com>
Okay, the preview URL does indeed change with the user that pushed last. Let's see whether merging this PR changes that, could you create another test PR after? |
It is working now, Thanks for the merge !! The Issue is, when a PR updates the workflows, GitHub Action shows the updated Workflow in workflow run file but runs the old workflow. |
Enhancement for more robust PR previews.
I noticed that when a workflow is triggered by a user commits from a fork, the preview link points to their repository due to the DOMAIN setting using
${{ github.actor }}
. This was causing the preview to point to the forked repository rather than the base repository. I have updated the DOMAIN to use${{ github.event.pull_request.base.repo.owner.login }}.github.io
, which ensures that the preview link always points to the base repository, regardless of who triggers the workflow.