There are lots of cases when in mono-repo you create a pull request that changes two or more projects. Lets consider a simple example, a monorepo with backend and frontend. Both of these projects create a deployment to vercel (preview) on each pull request. So lets say you are creating a pull request from branch feature-1 to main: 1- front: deployed to vercel preview on url: something-feat-1-preview.vercel.app 2- back: deplyoyed to vercel preview on url: something-feat1-be-preview.vercel.app
The front-end uses the backend URL to make requests to, but on each deplyoment these URLS change and we need a way to set it to the correct thing (also there are cases where the build process uses the API_URL, so the project might get built with the incorrect url, frontend's deployment should happen AFTER the backend project is deployed). I really don't know how to achieve this. I would appreacite any help!! thanks for your time >_<