Set -u after setting default for DEPLOY_TO

Currently DEPLOY_TO is accidentally required, not optional
This won't do what you expect if `DEPLOY_TO` is undefined.  It will blow up on the `if` line because of the `set -u` above.  You probably want something like `${DEPLOY_TO-}` there instead.