mirror of
https://codeberg.org/lauralani/www-lauka-net.git
synced 2024-11-23 20:50:40 +01:00
fix stupidity
This commit is contained in:
parent
c1f5fc02aa
commit
270b700f3f
1 changed files with 22 additions and 22 deletions
|
@ -9,34 +9,13 @@ steps:
|
||||||
- rm -rf public/
|
- rm -rf public/
|
||||||
- npx @11ty/eleventy --input=. --output=public
|
- npx @11ty/eleventy --input=. --output=public
|
||||||
|
|
||||||
deploy-stage:
|
deploy-staging:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: staging
|
branch: staging
|
||||||
secrets:
|
secrets:
|
||||||
- SSH_KEY
|
- 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 -W --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
|
|
||||||
|
|
||||||
|
|
||||||
deploy-prod:
|
|
||||||
image: alpine:latest
|
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
branch: main
|
|
||||||
secrets:
|
|
||||||
- SSH_KEY
|
|
||||||
environment:
|
environment:
|
||||||
- TARGET_SERVER=cloud.lauka.net
|
- TARGET_SERVER=cloud.lauka.net
|
||||||
- TARGET_USER=webadmin
|
- TARGET_USER=webadmin
|
||||||
|
@ -49,3 +28,24 @@ steps:
|
||||||
- ssh-keyscan -t ed25519 $TARGET_SERVER >> $HOME/.ssh/known_hosts
|
- ssh-keyscan -t ed25519 $TARGET_SERVER >> $HOME/.ssh/known_hosts
|
||||||
- cd public/
|
- cd public/
|
||||||
- rsync -avh -W --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
|
- rsync -avh -W --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
|
||||||
|
|
||||||
|
|
||||||
|
deploy-production:
|
||||||
|
image: alpine:latest
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
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 -W --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
|
||||||
|
|
Loading…
Reference in a new issue