This is my code github link: https://github.com/Spale96/WeatherApi
I have changed my API key inside my VScode, but netlify still uses old API key even after I have added environment variable inside with new API key.
My question is how to update API key on github and netlify?
I have added environment variable with new API key on netlify but it doesn't update at all.
Updating API Key on GitHub:
git add .
git commit -m "Updated API key"
git push origin main
Updating API Key on Netlify:
Make sure you're updating the environment variable for the correct site if you have multiple sites on Netlify.
If you've already set the environment variable on Netlify and it's not updating, you might need to trigger a redeployment of your site for the changes to take effect. Netlify doesn't automatically update environment variables for existing deployments. Here's how you can trigger a redeployment:
In your Netlify dashboard, go to the "Deploys" section for your site.