I have the following in .gitlab-ci.yml for pipeline for development server:
stages:
- deploy
deploy to dev:
stage: deploy
tags:
- development
script:
- chmod og= $ID_RSA_DEVELOPMENT
- apk update && apk add openssh-client
- ssh -i $ID_RSA_DEVELOPMENT -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP_DEVELOPMENT "cd /home/deployer/folder-name && bash dev.sh"
environment:
name: development
url: http://{IP Address}
only:
- dev
This pipeline is triggered by pushing to dev branch. The pipeline for production seems to working fine with the same code with