pipeline { agent any options { timestamps(); disableConcurrentBuilds() } environment { DEPLOY_HOST = 'web@YOUR_SERVER_IP_OR_DNS' DEPLOY_PATH = '/srv/www/masha-site' SSH_CRED_ID = 'web-ssh' } stages { stage('Checkout') { steps { checkout scm } } stage('Deploy') { steps { sshagent(credentials: [env.SSH_CRED_ID]) { sh 'bash deploy/deploy.sh "$DEPLOY_HOST" "$DEPLOY_PATH"' } } } } post { success { echo 'Deployed' } failure { echo 'Failed' } } }