cicd 5
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 1m10s

This commit is contained in:
Gal Podlipnik 2025-06-12 16:31:45 +02:00
parent 64953185a2
commit 5611ee1421

View File

@ -87,15 +87,30 @@ jobs:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
script_stop: true
script: |
mkdir -p ~/services/chat-app
cd ~/services/chat-app
- name: Copy docker-compose.yml
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
source: "docker-compose.yml"
target: "~/services/chat-app"
- name: Complete Deployment
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
script: |
cd ~/services/chat-app
# Copy docker-compose.yml to server
echo "${{ github.workspace }}/docker-compose.yml" > docker-compose.yml
# Copy environment file if needed
# This assumes .env file is in the repository
# Copy environment file
echo "${{ secrets.ENV_CONTENT }}" > .env
# Pull latest images and deploy