mirror of
https://codeberg.org/lauralani/www-lauka-net.git
synced 2024-11-27 22:40:02 +01:00
update woodpecker CI
This commit is contained in:
parent
8d29de1e4b
commit
1d4f9acc01
1 changed files with 18 additions and 5 deletions
|
@ -1,4 +1,8 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
event: push
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: node:latest
|
image: node:latest
|
||||||
commands:
|
commands:
|
||||||
|
@ -6,11 +10,20 @@ pipeline:
|
||||||
- npx @11ty/eleventy --input=. --output=public
|
- npx @11ty/eleventy --input=. --output=public
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
image: node:18
|
image: alpine:latest
|
||||||
secrets:
|
secrets:
|
||||||
- SWA_CLI_DEPLOYMENT_TOKEN
|
- SSH_KEY
|
||||||
|
environment:
|
||||||
|
- TARGET_SERVER=cloud.lauka.net
|
||||||
|
- TARGET_USER=webadmin
|
||||||
|
- TARGET_PATH=/webroot/www.lauka.net
|
||||||
commands:
|
commands:
|
||||||
- npm install -D @azure/static-web-apps-cli
|
- apk add --update --no-cache openssh rsync git
|
||||||
- npx @azure/static-web-apps-cli deploy ./public --env Production
|
- 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
|
branches: main
|
||||||
|
|
Loading…
Reference in a new issue