update woodpecker CI

This commit is contained in:
Adora Laura Kalb 2023-04-07 18:56:07 +02:00
parent 8d29de1e4b
commit 1d4f9acc01
Signed by: adoralaura
GPG key ID: 7A4552166FC8C056

View file

@ -1,4 +1,8 @@
pipeline:
when:
branch: main
event: push
build:
image: node:latest
commands:
@ -6,11 +10,20 @@ pipeline:
- npx @11ty/eleventy --input=. --output=public
deploy:
image: node:18
image: alpine:latest
secrets:
- SWA_CLI_DEPLOYMENT_TOKEN
- SSH_KEY
environment:
- TARGET_SERVER=cloud.lauka.net
- TARGET_USER=webadmin
- TARGET_PATH=/webroot/www.lauka.net
commands:
- npm install -D @azure/static-web-apps-cli
- npx @azure/static-web-apps-cli deploy ./public --env Production
- 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