First pass at deploy task (dirty dirty code lol (needs clean up and refactoring)).