Change deploy script to handle environments