mirror of
https://codeberg.org/lauralani/www-lauka-net.git
synced 2024-11-27 22:40:02 +01:00
port CI over
This commit is contained in:
parent
c12a9f4ea1
commit
639ef8fe83
1 changed files with 23 additions and 23 deletions
|
@ -9,34 +9,13 @@ steps:
|
|||
- rm -rf public/
|
||||
- npx @11ty/eleventy --input=. --output=public
|
||||
|
||||
deploy-stage:
|
||||
deploy-staging:
|
||||
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 --checksum ./ $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
|
||||
|
@ -48,4 +27,25 @@ steps:
|
|||
- chmod 0600 $HOME/.ssh/id_ed25519
|
||||
- ssh-keyscan -t ed25519 $TARGET_SERVER >> $HOME/.ssh/known_hosts
|
||||
- cd public/
|
||||
- rsync -avh --checksum --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
|
||||
- rsync -avh --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 --delete ./ $TARGET_USER@$TARGET_SERVER:$TARGET_PATH
|
||||
|
|
Loading…
Reference in a new issue