added woodpecker build
This commit is contained in:
parent
ef11e3a814
commit
096eefeedf
2 changed files with 18 additions and 22 deletions
18
.woodpecker/main.yml
Normal file
18
.woodpecker/main.yml
Normal 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
22
Jenkinsfile
vendored
|
@ -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'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue