Files
codejava.tech/Jenkinsfile
2026-02-18 11:23:08 +03:00

30 lines
657 B
Groovy

pipeline {
agent any
environment {
DEPLOY_PATH = '/var/www/codejava.tech'
}
stages {
stage('Build') {
steps {
sh 'hugo --minify'
}
}
stage('Deploy') {
steps {
sh '''
rsync -az --delete -e "ssh -o StrictHostKeyChecking=no" \
public/ root@172.17.0.1:${DEPLOY_PATH}/
'''
}
}
}
post {
success {
echo 'Deployment successful! Visit https://codejava.tech'
}
failure {
echo 'Deployment failed!'
}
}
}