Skip to content

Commit

Permalink
fix: en na doulepsei oksa...?
Browse files Browse the repository at this point in the history
  • Loading branch information
apogiatzis committed Nov 21, 2024
1 parent 79c7cd3 commit 66ad787
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/push_image_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,17 @@ jobs:
apt-get update && apt-get install -y sshpass
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no "$SSH_USER@$SSH_HOST" "mkdir -p ~/ovisbot"
- name: Upload Code to Server
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
SSH_HOST: ${{ secrets.SSH_HOST }}
run: >
sshpass -p "$SSH_PASSWORD" rsync -avz --exclude '.git' ./
"$SSH_USER@$SSH_HOST:~/ovisbot"
- name: Deploy Application
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
SSH_HOST: ${{ secrets.SSH_HOST }}
run: >
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no
"$SSH_USER@$SSH_HOST" << 'EOF'
- name: Deploy to Server
uses: mai-space/action-sshpass-rsync@v1
with:
host: ${{ secrets.SSH_HOST }}
user: ${{ secrets.SSH_USER }}
port: 22
pass: ${{ secrets.SSH_PASS }}
local: "."
extra: "-avz --exclude '.git'"
remote: "~/ovisbot"
runAfterDeployment: |
cd ~/ovisbot
if [ -f docker-compose.yml ]; then
docker compose -f docker-compose.yml -f docker-compose.prod.yml down || true
Expand All @@ -80,4 +74,3 @@ jobs:
echo "docker-compose.yml not found in the repository!"
exit 1
fi
EOF

0 comments on commit 66ad787

Please sign in to comment.