refine deploy script