I am trying to accomplish the auto deploy of project to my shared hosting server.
What i am trying to accomplish is that the public directory needs to be checked out in the www directory, where as the other files and directories needs to checkout on the directory under root e-g /home/{username}/laravel-project-files
I see there is a "Sparse Checkout" option in git.
but i need to checkout to two different work directories with two different sets of files.
public will go to the /home/{username}/public_html/
where as remaining laravel project files will go under /home/{username}/laravel-project-files
I am just a GUI user of git, but hopefully there might be a solution or any other better way to handle this.
i am using github webhooks to auto deploy the project to my hosting server.
Simply put everything in /home/{username}/laravel-project-files
and then make a symlink at /home/{username}/public_html/
that points to /home/{username}/laravel-project-files/public
with something like rm -rf /home/{username}/public_html/ && ln -s /path/to/{laravelProject}/public /home/{username}/public_html
.