From 6f941e7842ea6f6e64b3275a41b71ac0775c5017 Mon Sep 17 00:00:00 2001 From: Ksan Date: Wed, 10 Jun 2026 19:22:10 +0200 Subject: [PATCH] fixing missing creds --- .gitea/workflows/ci.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 1aeb9d0..e45cda3 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -93,14 +93,23 @@ jobs: chmod 600 ~/.ssh/key ssh-keyscan -H "${{ secrets.DEPLOY_HOST }}" >> ~/.ssh/known_hosts - # Write secrets to VPS (only if they've changed or first deploy) - ssh -i ~/.ssh/key "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" \ + echo "${{ secrets.FIREBASE_CREDENTIALS }}" | base64 -d > /tmp/firebase.json + + ssh -i ~/.ssh/key \ + "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" \ "mkdir -p ~/programs/etf-oglasi-server/config" + echo "${{ secrets.MAIL_CREDS }}" | base64 -d > /tmp/.creds - echo "${{ secrets.FIREBASE_CREDENTIALS }}" | \ - ssh -i ~/.ssh/key "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" \ - "cat > ~/programs/etf-oglasi-server/config/firebase.json" + scp -i ~/.ssh/key \ + /tmp/firebase.json \ + /tmp/.creds \ + "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:~/programs/etf-oglasi-server/config/" - ssh -i ~/.ssh/key "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" \ + + + rm /tmp/firebase.json + + ssh -i ~/.ssh/key \ + "${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}" \ "cd ~/programs/etf-oglasi-server && docker compose pull && docker compose up -d"