Repeated build fails how to get API keys added to netlify

I am having problems trying to deploy a Gatsby site which has Algolia search functionality included.
I have a .env file with my ENV_VARIABLES set up and I have transferred these to the deploy settings section of the netlify ui.

These build and run locally, however I am getting netlify build failures when I deploy, that say:

AlgoliaSearchError: Please provide an API key. Usage: algoliasearch(applicatio nID, apiKey, opts)

I have seen a number of posts on the subject and seen suggestions that they should be prefixed with GATSBY_

I have tried changing my env_variables in my app to reference the suitably prefixed version and updated the netflify env_variables but I getthe same error.

Here’s an example of my try everything approach:

1 Like

Have you seen this article? Setting the variables is not enough; you must also interpolate them in your files during build: