mirror of
https://codeberg.org/lauralani/www-lauka-net.git
synced 2024-11-24 05:00:02 +01:00
update CI
This commit is contained in:
parent
8fe7814293
commit
c833b13883
2 changed files with 52 additions and 26 deletions
|
@ -1,26 +0,0 @@
|
||||||
when:
|
|
||||||
event: push
|
|
||||||
branch: main
|
|
||||||
pipeline:
|
|
||||||
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
|
|
52
.woodpecker/deploy.yaml
Normal file
52
.woodpecker/deploy.yaml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
steps:
|
||||||
|
build:
|
||||||
|
image: node:19
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
- branch:
|
||||||
|
- main
|
||||||
|
- staging
|
||||||
|
commands:
|
||||||
|
- npm install -D @11ty/eleventy
|
||||||
|
- npx @11ty/eleventy --input=. --output=public
|
||||||
|
|
||||||
|
deploy-stage:
|
||||||
|
image: alpine:latest
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
- branch: staging
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
deploy-prod:
|
||||||
|
image: alpine:latest
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
- branch: main
|
||||||
|
secrets:
|
||||||
|
- SSH_KEY
|
||||||
|
environment:
|
||||||
|
- TARGET_SERVER=cloud.lauka.net
|
||||||
|
- TARGET_USER=webadmin
|
||||||
|
- TARGET_PATH=/webroot/staging-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
|
Loading…
Reference in a new issue