How to delete page previews when pr is closed

I have pages configured with a github source. Is it possible to auto-delete previews when the associated github pr is closed?