added woodpecker build

This commit is contained in:
Ell 2023-07-02 19:23:59 +02:00
parent ef11e3a814
commit 096eefeedf
2 changed files with 18 additions and 22 deletions

18
.woodpecker/main.yml Normal file
View file

@ -0,0 +1,18 @@
steps:
build:
image: node:latest
commands:
- cd src
- npm install
- npx presskit build --output ../out --pretty-links --collapse-menu --clean-build-folder
- cp .htaccess ../out
deploy:
image: debian:latest
when:
- event: [push, manual]
branch: master
commands:
- rm -rfv /var/www/press/*
- cp -rv out/. /var/www/press
volumes:
- /var/www/press:/var/www/press

22
Jenkinsfile vendored
View file

@ -1,22 +0,0 @@
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'''
}
}
}
}