Imp API for On Deployments?

Can we catch the event of a new deployment being pushed? I require some steps before powering down the device.

Yes, see server.onshutdown(): https://developer.electricimp.com/api/server/onshutdown