Cannot access $DEPLOY_URL with netlify build

I took a look at this thread and found a solution:

[context.deploy-preview]
  command = "export REACT_APP_REDIRECT_URI=$DEPLOY_URL 
REACT_APP_LOGOUT_URL=$DEPLOY_URL/v2/logout && npm run build"
2 Likes