diff --git a/Jenkinsfile b/Jenkinsfile index 7b2c86f..4d8aa77 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,9 +4,20 @@ pipeline { stage ("build") { steps { nodejs("NodeJS (17.4.0)") { + sh "npm install" sh "npm run build" } } } + stage ("deploy") { + when { + branch '**/master' + } + steps { + sshagent(['63d79efc-7b2b-43d6-87ad-90edebf74b1b']) { + sh "scp -r dist/** www-data@sys.reslate.xyz:/var/www/ent.sys.reslate.xyz" + } + } + } } } \ No newline at end of file