Refine deploy script.