Add debug output for deploy key
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Deploy Staging / Build backend (Nitro) (push) Has been cancelled
Deploy Staging / Deploy zu Hetzner (push) Has been cancelled

This commit is contained in:
chahinebrini 2026-06-18 07:52:49 +02:00
parent 3db9dd9326
commit 53f5b2a2f1

View File

@ -30,6 +30,16 @@ steps:
- cd apps/admin && pnpm build - cd apps/admin && pnpm build
depends_on: [install] depends_on: [install]
debug-secret:
image: alpine:3.21
secrets: [staging_deploy_key]
commands:
- echo "SECRET_LENGTH=$(echo -n \"$STAGING_DEPLOY_KEY\" | wc -c)"
- echo "$STAGING_DEPLOY_KEY" | base64 -d > /tmp/key_test
- wc -l /tmp/key_test
- head -1 /tmp/key_test
depends_on: [build-backend]
deploy-backend: deploy-backend:
image: alpine:3.21 image: alpine:3.21
secrets: [staging_deploy_key] secrets: [staging_deploy_key]
@ -38,6 +48,7 @@ steps:
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo "$STAGING_DEPLOY_KEY" | base64 -d > ~/.ssh/id_ed25519 - echo "$STAGING_DEPLOY_KEY" | base64 -d > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519
- ssh-keygen -y -f ~/.ssh/id_ed25519
- ssh-keyscan -H staging.rebreak.org > ~/.ssh/known_hosts 2>/dev/null - ssh-keyscan -H staging.rebreak.org > ~/.ssh/known_hosts 2>/dev/null
- tar czf backend-output.tar.gz -C backend/.output . - tar czf backend-output.tar.gz -C backend/.output .
- scp -i ~/.ssh/id_ed25519 backend-output.tar.gz root@staging.rebreak.org:/srv/rebreak/backend/.output-incoming.tar.gz - scp -i ~/.ssh/id_ed25519 backend-output.tar.gz root@staging.rebreak.org:/srv/rebreak/backend/.output-incoming.tar.gz