Move deployment into script, add condition.