Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wingly's avatar
Level 29

Preview branch deployments

Hey all, I would like to setup branch preview deployments with forge. Basically when a PR is opened create a new site, database etc and deploy. The QA team can visit this unique url and do the quality assurance. On PR closed delete the site. I don't have a problem to set it up in a Monorepo architecture using forge API or even a package like https://github.com/ryangjchandler/forge-previewer but my situation is a bit more complicated. The frontend application leaves in a separate repository written with Nuxt js and the API is in another repository written with Laravel. I just can't wrap my head around of how to orchestrate this. So let's say a feature of adding an update profile form will need changes in both repositories and probably different people would be working on the tickets. How can I orchestrate the deployment in such cases? Has any one dealt with a similar situation? Any pointers will be greatly appreciated. Thanks

0 likes
4 replies
martinbean's avatar

@wingly If they’re the same application then I don’t understand why they’re in different repositories to begin with. You’ve already found out the reasons not to do this: it makes coordinating developing features difficult, and makes deployments more difficult.

wingly's avatar
Level 29

@martinbean hey thanks for your reply if can help me a bit to understand better... So basically you would merge let's say all the repos into one for example and have \api \website \mobile etc directories with each one hosting each own code. The you would have one centralized CI process for handling deployments? My question is that for example the website and the API have different deployment target (different servers different .env different nginx configuration SSR handling etc) is this a blocker for the setup that you described?

mehrancodes's avatar

In case you're still interested, I recently made a CLI tool that automates Nuxt.js deployment and API deployment separately: https://github.com/mehrancodes/veyoze

Currently in beta, and I'm working on documentation to add more examples of how to use it.

1 like
larrybarker's avatar

I too made a tool for this :D

Glimpse automatically deploys your GitHub PRs to preview environments on Laravel Forge.

Sign up for a free 7-day trial at https://www.glimpse.sh

Feel free to reach out if you have questions!

Please or to participate in this conversation.