more robust deploy script in starter template