update CI with yaml anchor
Some checks failed
ci/woodpecker/push/deploy-rsync Pipeline failed

This commit is contained in:
Adora Laura Kalb 2024-07-15 10:57:49 +02:00
parent 0c92e07866
commit d591813b8b
Signed by: adoralaura
SSH key fingerprint: SHA256:3XrkbR8ikAZJVtYfaUliX1MhmJYVAe/ocIb/MiDHBJ8

View file

@ -2,6 +2,9 @@ when:
- event: push - event: push
branch: [main, staging] branch: [main, staging]
variables:
- &SSH_PORT "2003"
steps: steps:
build: build:
image: golang:1.22-bookworm image: golang:1.22-bookworm
@ -22,7 +25,7 @@ steps:
- RSYNC_TARGET_USER - RSYNC_TARGET_USER
environment: environment:
- TARGET_PATH=/webroot/adora.codes - TARGET_PATH=/webroot/adora.codes
- RSYNC_TARGET_PORT=2003 - *SSH_PORT
commands: commands:
- apk add --update --no-cache openssh rsync git - apk add --update --no-cache openssh rsync git
- mkdir -p $HOME/.ssh - mkdir -p $HOME/.ssh
@ -41,7 +44,7 @@ steps:
- RSYNC_TARGET_USER - RSYNC_TARGET_USER
environment: environment:
- TARGET_PATH=/webroot/www-staging.adora.codes - TARGET_PATH=/webroot/www-staging.adora.codes
- RSYNC_TARGET_PORT=2003 - *SSH_PORT
commands: commands:
- apk add --update --no-cache openssh rsync git - apk add --update --no-cache openssh rsync git
- mkdir -p $HOME/.ssh - mkdir -p $HOME/.ssh