Dynamic triggers and webhooks

I have been using GitLab for a good while now, but I am currently investigating implementing Rancher into our stack. I have successfully implemented a test CI build that will push a branch of test-1 to test-1.ci.example.com. What I am looking for is a good way to remove the deployed image when the branch is deleted, but I don’t see a way to gather from a webhook that a branch was deleted. Is this possible and I am just missing it or is it not possible?

I would also be interested in hearing from anyone else who has implemented a Rancher stack and used with GitLab CI.