Preview Deployment not deployed correctly in Pull Request from forked repository
To Reproduce
- Create application
- Enable Preview Deployment
- Create a Pull Request from one of the forked repository
- Visit
/etc/dokploy/applications/{{aplication_name_preview}}/codein host machine - Execute
git ls-remote --get-url origin
When you follow the steps, in the preview code folder, the remote origin url is not the pull request source repository, but it is the application's repository
Current vs. Expected behavior
Following the steps
Expected Behaviour: When accessing the preview deployment folder (/dokploy/applications/{{application_name_preview}}/code) on the host machine, the repository should reflect the source repository with the pull request (PR).
Current Behavior: Instead of being on the pull request source repository, the repository remains on the application's repository. This prevents the preview deployment from accurately reflecting the PR changes.
Provide environment information
Operating System:
OS: Debian GNU/Linux 12 (bookworm)
Arch: x86_64
Dokploy version: v0.21.5
VPS Provider: Hostinger
In Nextjs static export with nixpacks
Which area(s) are affected? (Select all that apply)
Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Remote server
Additional context
No response
Will you send a PR to fix it?
Maybe, need help
This is the expected behaviour, currently only repositories that are sourced from the original source will be deployed, this can be an ehancement
I think this will be a good improvement.
Do i need to implement this? I could send a pr if needed.
I am new to open source contributions. Could you point me in the right direction
Yeah it would be really cool to have this, I am open to receive a PR on this,
an idea would be to check this code which is basically the one that triggers all the previews deployments https://github.com/Dokploy/dokploy/blob/canary/apps/dokploy/pages/api/deploy/github.ts#L205-L308
based on the events there we extract the metadata like the branch repository details, etc.