Update woodpecker pipeline

This commit is contained in:
Michał Gdula 2025-03-31 10:32:32 +01:00
parent 3549af3edc
commit ae8bec6bf4
2 changed files with 24 additions and 10 deletions

View file

@ -1,10 +0,0 @@
when:
- event: push
branch: main
steps:
- name: build
image: node:23-alpine3.20
commands:
- npm install
- npm run build

24
.woodpecker/pipeline.yaml Normal file
View file

@ -0,0 +1,24 @@
when:
- event: push
branch: main
steps:
- name: build
image: node:23-alpine3.20
commands:
- npm install
- npm run build
- name: deploy
image: alpine:latest
commands:
- apk add --no-cache openssh-client
- mkdir -p ~/.ssh
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh -o StrictHostKeyChecking=no uncertainty@192.168.0.42 "rm -r $COPY_TO || true"
- scp -o StrictHostKeyChecking=no -r $COPY_FROM uncertainty@192.168.0.42:$COPY_TO
environment:
COPY_FROM: dist
COPY_TO: /home/uncertainty/www/gay_leggy_dev
SSH_KEY:
from_secret: ssh_key