forked from BLC/sgeUpdated
Update .gitea/workflows/sgeupdated.yml
All checks were successful
sgeUpdated CI/CD / deploy (push) Successful in 7s
All checks were successful
sgeUpdated CI/CD / deploy (push) Successful in 7s
This commit is contained in:
@@ -7,19 +7,24 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
# 'ubuntu-latest' is a common name for runners.
|
||||||
|
# Check with your Gitea admin if you have a different runner tag.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Gitea automatically checks out your code, so we don't need 'actions/checkout'
|
||||||
|
|
||||||
- name: Setup SSH
|
- name: Setup SSH
|
||||||
run: |
|
run: |
|
||||||
# Create the .ssh directory
|
# Create the .ssh directory
|
||||||
mkdir -p ~/.ssh/
|
mkdir -p ~/.ssh/
|
||||||
|
|
||||||
|
# Add your private key (from Gitea secrets)
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
# Add your server's host key to known_hosts to avoid the 'yes/no' prompt
|
||||||
|
# This is a critical step for automation
|
||||||
ssh-keyscan ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
- name: Deploy to Server
|
- name: Deploy to Server
|
||||||
@@ -91,10 +96,10 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# This is your final 'build all' condition
|
# This is your final 'build all' condition
|
||||||
#if [ "$BACKEND_CHANGED" = false ] && [ "$FRONTEND_CHANGED" = false ]; then
|
# if [ "$BACKEND_CHANGED" = false ] && [ "$FRONTEND_CHANGED" = false ]; then
|
||||||
# echo "♻️ No source changes detected. Ensuring all containers are up."
|
# echo "♻️ No source changes detected. Ensuring all containers are up."
|
||||||
#docker compose up -d
|
# docker compose up -d
|
||||||
#fi
|
# fi
|
||||||
|
|
||||||
echo "✅ Deployment script finished."
|
echo "✅ Deployment script finished."
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user