Close old instance before deploy of new one

On git push when redeploy starts on Koyeb - is there a way to close/stop the old instance AFTER new build but BEFORE new deploy.
I have apps that cannot be started concurrently.