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