• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Deploy different git branch on different subdomain

VojinP

Basic Pleskian
Server operating system version
Linux ubuntu
Plesk version and microupdate number
Obsidian, latest
We are working as a team on local computers. We have testing subdomain (test.domain.com) where we deploy main branch. And on prodcution domain (www.domain.com) we deploy production branch. Repository is on the plesk. Unfortunatelly there is only one automated deployment option (for single branch). Is there any way on Plesk Git to auto-deploy more branches?
 
Hello Peter, no, that is not what am I asking for. Changing deploy branch each time is painful process and buggy.
 
Let's say I have branches main and production. When I push branch main, it should deploy to /stage.domain.com , and when I push branch production, it should deploy to /httpdocs.
 
I'd like to second this. This was completely the default assumption of compatibility required when setting up prod/dev testing environments.

What I expect:
Assume we own "domain.com".

domain.com - pulls from git main branch
test.domain.com - pulls from git dev branch

This is not possible at all because the git repository already exists for domain.com.
The temporary solution is to either create an entirely new repository, or not use a subdomain at all, which further complicates/ignores the issue.

This should be a default in how the git extension works, as millions of folks standardize their testing with prod/dev stacks/environments.
Do we have any word on whether or not this feature will be introduced?
 
@Peter Debik there is simple solution for automatic deployment using selected branch. Please just add additional paramater for the webhook and pass its value to the deploy actions. That way we will be using that parameter to pull the changes from provided branch for eg:
plesk Webhook URL: .../git/public/web-hook.php?uuid=2377d&param1={BRANCH}
plesk Deploy actions: .../deploy-test.sh $param1
That way I can pull selected branch in the deploy-test.sh script and that branch is setup in deploy job in gitlab.
 
Back
Top