Refactoring deploy actions