Optimize deploy script.