From 0c92e07866c4c429a1bfdffdde9a2c77e65a761d Mon Sep 17 00:00:00 2001 From: Adora Laura Kalb Date: Mon, 15 Jul 2024 10:51:05 +0200 Subject: [PATCH] updated pipeline --- .woodpecker/deploy-rsync.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.woodpecker/deploy-rsync.yaml b/.woodpecker/deploy-rsync.yaml index 15b79b0..60b2c8a 100644 --- a/.woodpecker/deploy-rsync.yaml +++ b/.woodpecker/deploy-rsync.yaml @@ -1,12 +1,13 @@ +when: + - event: push + branch: [main, staging] + steps: build: image: golang:1.22-bookworm environment: - HUGO_VERSION=0.128.2 - TZ=Europe/Berlin - when: - - event: push - branch: [main, staging] commands: - wget https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && apt install ./hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && rm -f hugo_extended_$${HUGO_VERSION}_linux-amd64.deb - hugo --minify --destination ./public @@ -23,7 +24,6 @@ steps: - TARGET_PATH=/webroot/adora.codes - RSYNC_TARGET_PORT=2003 commands: - - cd docs/ - apk add --update --no-cache openssh rsync git - mkdir -p $HOME/.ssh - echo "$RSYNC_SSHKEY" > $HOME/.ssh/id_ed25519 @@ -43,7 +43,6 @@ steps: - TARGET_PATH=/webroot/www-staging.adora.codes - RSYNC_TARGET_PORT=2003 commands: - - cd docs/ - apk add --update --no-cache openssh rsync git - mkdir -p $HOME/.ssh - echo "$RSYNC_SSHKEY" > $HOME/.ssh/id_ed25519