thp-web/Jenkinsfile.groovy

34 lines
829 B
Groovy

pipeline {
agent any
environment {
PATH = "/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:/var/lib/jenkins/bin:${env.PATH}"
}
stages {
stage('Test env') {
steps {
echo 'Testing...'
echo 'Is pnpm working?...'
sh 'pnpm --version'
}
}
stage('Install') {
steps {
sh 'pnpm i'
}
}
stage('Build') {
environment {
PATH = "${env.WORKSPACE}/node_modules/.bin:${env.PATH}"
}
steps {
sh 'md-docs'
sh 'pnpm tailwind:build'
}
}
stage('Deploy') {
steps {
sh 'cp -r ./static/* /var/www/thp-docs/'
}
}
}
}