There are some issues with the way you have implemented your CI workflows:
- It sounds like CodeFresh is attempting to do a build on the branch that is being merged and deleted. Instead, you should be building on your integration branch (e.g., Develop, master).
- If you choose to adopt a Pull Request workflow, you'll still have this issue if the code is merged and the source branch is deleted before the branch build completes.
Consider implementing a workflow where you only build a branch if there is a Pull Request and the branch is updated. Otherwise, stick to compiling just the mainline integration branch. This will ultimately speed up your CI process as well.