From 270b700f3feca8768796079f7f835126cf7817ef Mon Sep 17 00:00:00 2001 From: lauralani Date: Wed, 14 Jun 2023 11:21:50 +0200 Subject: [PATCH] fix stupidity --- .woodpecker/deploy.yaml | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml index 6b667d5..8b68881 100644 --- a/.woodpecker/deploy.yaml +++ b/.woodpecker/deploy.yaml @@ -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 -W --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 @@ -49,3 +28,24 @@ steps: - ssh-keyscan -t ed25519 $TARGET_SERVER >> $HOME/.ssh/known_hosts - cd public/ - 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