Ell
f5d4c9d533
All checks were successful
Jenkins
Ellpeck/Press/pipeline/head This commit looks good
22 lines
462 B
Groovy
22 lines
462 B
Groovy
pipeline {
|
|
agent { label 'web' }
|
|
stages {
|
|
stage('Build') {
|
|
steps {
|
|
sh '''cd src
|
|
npm install
|
|
npx presskit build --output ../out --pretty-links --collapse-menu --clean-build-folder
|
|
cp .htaccess ../out'''
|
|
}
|
|
}
|
|
stage('Publish') {
|
|
when {
|
|
branch 'main'
|
|
}
|
|
steps {
|
|
sh '''rm -rf /var/www/press/*
|
|
cp -r out/. /var/www/press'''
|
|
}
|
|
}
|
|
}
|
|
}
|