edit deploy function to use environment variables from refactor