Refactored the deploy

This change refactors the deploy structure to use the new workflow api. Also fix a bug related
to caching workflow polling. Also created an environment input helper and deploy log annotations.