www-lauka-net-11ty/.woodpecker.yml
2023-04-07 19:06:51 +02:00

29 lines
741 B
YAML

pipeline:
when:
branch: main
event: push
build:
image: node:19
commands:
- npm install -D @11ty/eleventy
- npx @11ty/eleventy --input=. --output=public
deploy:
image: alpine:latest
secrets:
- SSH_KEY
environment:
- TARGET_SERVER=cloud.lauka.net
- TARGET_USER=webadmin
- TARGET_PATH=/webroot/www.lauka.net
commands:
- apk add --update --no-cache openssh rsync git
- mkdir -p $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_ed25519
- chmod 0600 $HOME/.ssh/id_ed25519
- ssh-keyscan -t ed25519 $TARGET_SERVER >> $HOME/.ssh/known_hosts
- cd public/
- rsync -avh --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
branches: main