The following workflow does not reliably work with wait-for-netlify-action:
- Create a branch
test
- Push the branch to origin and create a PR
- Deploys the website
- Waits for 200 on deploy preview
- Proceed with additional scripts (e.g. Lighthouse)
=> As expected
- Add a new commit on branch
test
- Push the commit to origin
- Waits for 200 on deploy preview immediately gives an "ok" because the previous deploy is still online
- The additional scripts still use the old deploy preview (e.g. Lighthouse)
=> Not as expected
An easy fix to workaround this is sure with a simple sleep:
- name: Sleep
run: sleep 50
... but that is not really clean since we would need to update the sleep value every time the build step takes more or less time after changes.