Files
sgeUpdated/.gitea/workflows/sgeupdated.yml
Abdulbari 4a9b65cc30
All checks were successful
sgeUpdated CI/CD / deploy (push) Successful in 7s
Update .gitea/workflows/sgeupdated.yml
2025-10-30 18:46:25 +03:00

30 lines
692 B
YAML

name: sgeUpdated CI/CD
on:
push:
branches:
- main
pull_request:
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