mirror of
https://codeberg.org/lauralani/www-lauka-net.git
synced 2024-11-23 20:50:40 +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:
|
||||
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
|
||||
secrets:
|
||||
- SWA_CLI_DEPLOYMENT_TOKEN
|
||||
image: alpine:latest
|
||||
secrets:
|
||||
- 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
|
||||
|
|
Loading…
Reference in a new issue