Put application into production

I want to put my application into production, but I’m lost in how to handle various development / production environments with firebase, cloud function, analytics, map APIs and other Google APIs, also know how to handle environment variables and be able to hide the API keys.
Are there any guidelines I can follow to avoid making mistakes at this critical time?