GitHub Actions: one push runs workflow twice
After one merge two almost identical runs appear and can publish the same file. Workflow can listen at the same time to push and pull request, or several workflow takes a similar step.
How to determine the source of the error
Check the event of each run and which YAML files define publication.
See if a separate workflow has the same group of competitors or interfere in the same branches.
What to do step by step
1. Reduce publication to a trusted event on the main and transfer PR tests to a separate job.
2 . Add a concurrency group and an impotent content identifier so that two parallel runs do not duplicate the data.
How to check the score
One production commit gives one publication, and several test builds do not create excess articles.
What to do
Do not delete PR tests just because their status in the panel looks similar.