wait-for-netlify-action
wait-for-netlify-action copied to clipboard
Generated deploy preview url mismatches with netlify preview url
Hello,
I am currently using the wait-for-netlify-action within a Github actions CI to generate the deploy preview URL of a relatively new project ( 3 merged PRs ) after which tests are run against the deployed preview.
Expected Behavior
wait-for-netlify-action should generate the URL of the preview deployed from the pull request after the deployed preview returns a 200 status code.
Current Behavior
wait-for-netlify-action is generating a preview URL that mismatches with the netlify preview deploy URL. The pull request number appears to be what breaks the generated URL.
I.e wait-for-netlify-action generates 9 as the pull request number, however, the pull request number on Netlify is 4. This leads to the Url unavailable, retrying error and eventually a timeout error.
The affected repository can be found here.
See attached screenshot.

@vickywane - That's really odd, I haven't seen that before. I wonder if it is related to this new feature they shipped today? https://www.netlify.com/blog/2021/05/19/next-generation-deploy-previews-plus-netlify-acquires-featurepeek/
@vickywane - That's really odd, I haven't seen that before. I wonder if it is related to this new feature they shipped today? https://www.netlify.com/blog/2021/05/19/next-generation-deploy-previews-plus-netlify-acquires-featurepeek/
I really doubt if this bug is related to the recently shipped feature from Netlify.
We have had this issue on this specific pull request for almost a month now.
I think it's related to how the wait-for-netlify-action is getting the pull request ID ( this is what causes the mismatch).
The action works fine on my own fork with the CI setup ( see the latest build ).
I also reported this bug on the Netlify community forum here, probably I can get more insight from there.
Ok, the way the action gets the ID is from GitHub PR ID. The action does seem to be using the PR ID as expected (9). But for some reason, Netlify seems to be using a different deploy preview URL. I'm not sure why and I, unfortunately, don't think that's there's any way of correcting that from within the action. 😞