I am currently working on a Linux bash script to deploy a specified branch of my git project on my website : the develop branch to a test subdomain and the main branch to the main domain.
To do so, I ask for a user input (the branch name) and execute my set of commands to deploy on the right subdomain. The only problem I have is that, these operations involve moving certain parts of the project and so, I don't really see how I could deploy the two versions. To me, the two options are :
How could I use one repository from which I deploy two branches on two different subdomains ? Is it even possible ?
I thought that I could just switch to the choosed branch and then update but that changes the project for both versions, which seems logical now since the whole project is accessed.
Turns out what I wanted to achieve is impossible. So, have two branches of a same repo running on two separate domains, I downloaded the project twice and have a script to deploy the branch I want...