When a build is ignored, the action fails to retrieve the existing deployment
When one configures an ignore command on Vercel, and pushes a new commit, the action fails to retrieve any existing deployments (shown as outdated on GitHub) if the build is skipped:

I tried passing ref here https://github.com/patrickedqvist/wait-for-vercel-preview/blob/1d4a973cb668249d5fb0e34d04be05634e396a8b/action.js#L217 instead of sha (e.g. passing the branch name), but it doesn't seem to work (maybe because Vercel only sets the deployment on commits).
Another solution would be to retrieve previous commits and look for deployments from them, but there could be a race condition here where a new one hasn't appeared yet and we get the stale one.
Not sure what's the proper solution for it
Hi @erezrokah! Did you try adding allow_inactive: true in the action parameters? From what you're describing it seems that should work if there already was a preview in the PR and this setting defaults to false https://github.com/patrickedqvist/wait-for-vercel-preview#allow_inactive
Hi @oxfist thanks for the reply! We are using allow_inactive: true, however I think the cause is that the action retrieves deployments for a specific sha so if you push a new commit that is ignored on Vercel that commit sha won't have any deployments retrieved by the action (hence my attempt to use ref)
Our current workaround is to re-implement the Vercel ignore logic in our GitHub action workflow and only use wait-for-vercel if we expect a build to be triggered
Hey @erezrokah I'm currently facing the same issue.
Could you share in more details how you solved it?
If it's possible to share a code snippet, that would be great.
@MTG2000 see https://github.com/cloudquery/cloudquery/blob/88f46fa9c2a370c5b9356184ffce2836c8cb59c6/.github/workflows/broken_links.yml#L30 and https://github.com/cloudquery/cloudquery/blob/88f46fa9c2a370c5b9356184ffce2836c8cb59c6/website/scripts/diff.sh#L1