GamesWebsite/Jenkinsfile

23 lines
462 B
Text
Raw Normal View History

2021-07-07 15:05:57 +02:00
pipeline {
2023-04-12 22:09:11 +02:00
agent { label 'web' }
2021-07-07 15:05:57 +02:00
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
}