Closed rossjrw closed 1 year ago
https://medium.com/geekculture/make-github-workflows-run-consecutively-4d98840ed600
use one of:
https://github.com/lewagon/wait-on-check-action https://github.com/fountainhead/action-wait-for-check
make sure that the requested check is not required to have happened/be happening (not all buils will coincide with a preview and vice versa)
these plugins need a token - they recommend PAT, but standard can be used if it's within tolerance:
https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting
if advising end user to create a PAT, recommend adherence to security guidelines:
All of the above is rubbish. Actual solution: https://github.com/JamesIves/github-pages-deploy-action/pull/1054
Possibly fixed in 591779e70aba2ce461521af517b269dac0221c77 - needs confirmation
I haven't seen this crop up in ages, so calling it fixed.
Just encountered a situation where the build and preview workflow occurred at the same time (during the merge of a PR). They both attempted to write a commit on top of the current
gh-pages
commit. This resulted in the gh-pages branch moving to the commit that removed the preview for the PR, whereas the commit that deployed the build for the new commit made to the main branch was lost.I will need to investigate running workflows synchronously.