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.
This is the reason why Git has become an integral part of the workflow for developers around the world.You should follow these steps:
Generate SSH key
Upload SSH key to the GitHub repository
Copy the SSH address of the repository
Deploy the application code from the repository
You can deploy WordPress applications on the Cloudways Platform very easily, “Deployment Via Git” feature that helps connect your Git repository with the Cloudways managed server
Nice feature, but does it depend on where you host your website, or is it build-in to wordpress?