How to execute a stage in gitlab CI on merge?

Basically what I’m doing is creating a feature env in k8s using gitlab ci and kubectl. Once the merge request is either closed or merged I want to execute some script kubectl delete -f blah.yml to destroy the feature env. Is this possible set that conditional in gitlab-ci?