fixing missing creds
CI/CD / Backend Unit Tests (push) Successful in 2m3s
CI/CD / Deploy (push) Failing after 1m49s

This commit is contained in:
2026-06-10 19:22:10 +02:00
parent 8db2ecfefe
commit 6f941e7842
+15 -6
View File
@@ -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"