forked from BLC/AyposWeb
aypos workflow -v1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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
|
||||
Reference in New Issue
Block a user