simplify logic of deploy-server