From 096eefeedf7203f57a4d5c144401656c691737a9 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 2 Jul 2023 19:23:59 +0200 Subject: [PATCH] added woodpecker build --- .woodpecker/main.yml | 18 ++++++++++++++++++ Jenkinsfile | 22 ---------------------- 2 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 .woodpecker/main.yml delete mode 100644 Jenkinsfile diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml new file mode 100644 index 0000000..db68991 --- /dev/null +++ b/.woodpecker/main.yml @@ -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 diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 8fb0b72..0000000 --- a/Jenkinsfile +++ /dev/null @@ -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''' - } - } - } -}