diff --git a/Jenkinsfile b/Jenkinsfile index 98b8984..7c49967 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,11 +1,23 @@ pipeline { agent any + environment { + DEPLOY_DIR = '/var/jenkins_home/deployments/personal-website' + } stages { stage('Checkout') { steps { checkout scm } } + stage('copy to nginx server') { + steps { + sh """ + rm -rf ${DEPLOY_DIR}/* + cp -r * ${DEPLOY_DIR}/ + chmod -R 755 ${DEPLOY_DIR} + """ + } + } } post { failure {