You cannot “stack” variables like that unless you do some very special parsing. We don’t interpolate for you, so as you see, you’ll get the string literal rather than the interpretation of an interpretation. Kinda like if you set $vara="$varb" - it’s a string
You could try something like this:
- create a shell script for your build
- in the shell script, use your normal build command but first set up the environment.
I haven’t tested this but something like this may work:
export GATSBY_URL=$URL GATSBY_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL GATSBY_DEPLOY_URL=$DEPLOY_URL
npm run build
Effectively, since in our UI those are strings, you need to programatically dereference or interpolate your variables. What I suggested may or may not work but something like that could