Is there any way I could connect this website code with gitlab so whenever I push it to gitlab, it automatically goes to my hosting, and an update is made on the website?
I haven’t looked at the code, but you should be able to install a tagged gitlab runner on that node, which does the deployment on your website server. You can add that tag to a deployment step in your pipeline.
Or you could add a script in cron that pulls the code from gitlab and maybe other required stuff for the deployment.
The first option is more the Gitlab way, so I think that is preferable, you could also add some tests in the pipeline, so the automatic deployment is only triggered when the tests succeed.
CI/CD pipelines | GitLab is a nice start to read up on pipelines and deployments.
Thank you @bartj
I will look into this and update.
If you have our own server that is hosting the website the options are limitless starting from your own GitLab Runner to
scp files from GitLab to your server.