refactor deploy task