GitLab-CI deployment to a server environment
Current situation: We use GitLab-CI with one (shell) runner to deploy to a remote server environment based on what branch was merged to.
For example:
I push to fork/ProjectFoo, and no deploy happens.
I then merge with the main/ProjectFoo staging branch, and that causes the deploy script to run and update the staging server with the new code.
Finally I merge with main/ProjectFoo production branch, and that causes the deploy script to run and update the production server with the new code.
Here's the .gitlab-ci.yml and deploy.sh we're using in one project: https://gist.github.com/Getterac7/4c9a28ecc0f8aef8ab14
Ideal situation:
So, I'd like to move everything to the yml style CI because of some of the shortcomings with our current setup, including a "git pull" failure not being marked as a build failure. Unfortunately, I can't see a way to deploy to a specific server based on some rules.
Thanks!