Closed mgkimsal closed 11 months ago
potential fix in https://github.com/mehrancodes/veyoze/pull/35
To trigger the site deploy on new PR commits, consider listening for the synchronize event in the GitHub Action. Also, by setting FORGE_QUICK_DEPLOY=true, Forge will auto-update the site. I'll share a manual trigger example shortly.
Update: Just to clarify, the updateGitRepository method only updates git parameters and doesn't deploy on new commits. If that's what you're looking for, we can certainly incorporate it.
Not familiar with 'synchronize', but in general, I would expect if it deploys on a PR, changes to that PR (before it's closed) should also trigger updates/redeploy to get latest version.
i will check FORGE_QUICK_DEPLOY
I finally got the chance to prepare the provision workflow with ability to re-deploy on new changes.
Here is the complete working workflow you can use https://github.com/mehrancodes/veyoze-laravel-sample/blob/main/.github/workflows/pr-preview-provision.yml
Also here is a PR showing how does the provisioning works: https://github.com/mehrancodes/veyoze-laravel-sample/pull/6
I hope it gives you a better view.
marking this issue as completed, but feel free to reach out again if any concern left.
I've updated code in a PR and it triggers a new deploy/build, but the git repo is not updated
I think there should be a $service->site->updateGitRepository(...) instead of the immediate return $next();
Agreed? Unsure if that's intended or not, but I'd need PRs to update with new code if the code was updated.