Files
sgeUpdated/.gitea/workflows/sgeupdated.yml
Abdulbari cbe2660080 Update sgeupdated pipeline v25
New script to call the deploy.sh file in the server
2025-10-27 17:29:31 +03:00

27 lines
642 B
YAML

name: sgeUpdated CI/CD
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Run deploy script on server
run: |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
echo "✅ Connected to server. Running deploy script..."
cd /home/ubuntu/Bgreen/sgeUpdated
./deploy.sh
EOF