Specific directory deploy from master branch using git lab CD

Hi Team
We would like to move certain directory from master branch using git lab CD for remote server for deployments.

we need to include steps like move the directory from master branch

and stop the remote server command
and move the current deployed code to back up directory in remote server
and move current directory to remote server
and compile and start the remote server

these are the steps we need using git lab CD and for your reference we have all manual commands to compile and start and stop remote server but we are not sure on how to integrate those using git lab CD any response will be appreciated on this