2021-07-07 15:05:57 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
|
|
|
stage('Build') {
|
2023-01-12 23:18:22 +01:00
|
|
|
steps {
|
|
|
|
sh '''cd src
|
|
|
|
npm install
|
|
|
|
npx presskit build --output ../out --pretty-links --collapse-menu --clean-build-folder
|
|
|
|
cp .htaccess ../out'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Publish') {
|
2021-07-07 15:05:57 +02:00
|
|
|
when {
|
|
|
|
branch 'main'
|
|
|
|
}
|
|
|
|
steps {
|
2021-07-07 15:15:39 +02:00
|
|
|
sh '''rm -rf /var/www/press/*
|
2021-07-07 15:18:02 +02:00
|
|
|
cp -r out/. /var/www/press'''
|
2021-07-07 15:05:57 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-12 23:18:22 +01:00
|
|
|
}
|