new-ryuslash.org/Jenkinsfile

27 lines
679 B
Groovy

pipeline {
agent {
docker {
image 'silex/emacs:27.1-alpine-dev'
args '-u root --privileged'
}
}
stages {
stage('Build') {
steps {
sh 'make'
stash includes: 'public/*', name: 'public_html'
}
}
stage('Deploy') {
steps {
unstash 'public_html'
withCredentials([file(credentialsId: 'ryuslash.org-deploy-key', variable: 'KEY_FILE')]) {
sh 'rsync -e "ssh -p 4511 -i $KEY_FILE" -v -c -r --delete public/ "site@ryuslash.org:public_html/"'
}
}
}
}
}