Files
admin c7a64d98c0
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline was successful
fix: preserve db from --delete
2026-06-17 15:25:34 +00:00

51 lines
1.2 KiB
YAML

when:
event: [push, manual]
steps:
install:
image: node:20
commands:
- cd client && npm install
lint:
image: node:20
commands:
- cd client && npm run lint
depends_on: [install]
build:
image: node:20
commands:
- cd client && npm run build
depends_on: [install]
deploy-main:
image: alpine:latest
environment:
DEPLOY_KEY:
from_secret: deploy_key
commands:
- apk add --no-cache openssh rsync
- mkdir -p /ssh
- echo "$DEPLOY_KEY" > /ssh/deploy_key
- chmod 600 /ssh/deploy_key
- rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete --exclude '*.db' client/dist/ root@192.168.1.88:/var/www/
depends_on: [lint, build]
when:
branch: main
deploy-dev:
image: alpine:latest
environment:
DEPLOY_KEY:
from_secret: deploy_key
commands:
- apk add --no-cache openssh rsync
- mkdir -p /ssh
- echo "$DEPLOY_KEY" > /ssh/deploy_key
- chmod 600 /ssh/deploy_key
- rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete --exclude '*.db' client/dist/ root@192.168.1.118:/var/www/
depends_on: [lint, build]
when:
branch: dev