Extracted a method deployApp to use in deployment tasks