Refine deployment script