www-lauka-net-11ty/.woodpecker.yml

25 lines
684 B
YAML
Raw Normal View History

2022-11-10 20:20:40 +01:00
pipeline:
2023-04-07 18:56:07 +02:00
2022-11-10 20:25:21 +01:00
build:
2023-04-07 19:06:51 +02:00
image: node:19
2022-11-10 20:25:21 +01:00
commands:
2022-11-17 07:46:22 +01:00
- npm install -D @11ty/eleventy
2022-11-10 20:25:21 +01:00
- npx @11ty/eleventy --input=. --output=public
2022-11-10 20:20:40 +01:00
deploy:
2023-04-07 18:56:07 +02:00
image: alpine:latest
secrets:
- SSH_KEY
environment:
- TARGET_SERVER=cloud.lauka.net
- TARGET_USER=webadmin
- TARGET_PATH=/webroot/www.lauka.net
2022-11-10 20:20:40 +01:00
commands:
2023-04-07 18:56:07 +02:00
- 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