The topic question may not accurately reflect what I’m trying to do so apologises for that!
My use case is fairly simple, I want to be able to create an isolated environment for each pull request made and generate a deploy preview.
Assuming I have 2 services that are used together:
- Backend API - Deployed as a lambda function with a generated url
- Frontend (React) - Deployed to netlify
And assuming that the Frontend needs the Backend generated url to call it later on.
So our CI process looks like:
- Build the backend
- Get output from step 1 (which will be the backend url)
- export API_URL as env variable in the build step for the frontend
- Build frontend
As you can tell there is a reliance on one build step output in the next, this is doable for regular deployments (production and branch deploys). But it seems like there isn’t a way to do this for deploy previews. Because as far as I understand you can’t manually create deploy previews because it needs to have a reference to the commit, is there perhaps a way to provide these?
The reason why we want deploy previews is mainly for the commenting, screen caps, video caps because it’s been very useful to us in lowering the barrier for collecting feedback.
Thanks in advance and let me know if anything is unclear!