This commit is contained in:
@@ -16,7 +16,19 @@ jobs:
|
||||
run: |
|
||||
echo "Démarrage de la connexion vers le serveur distant..."
|
||||
|
||||
# Exécution de la commande sur une seule ligne condensée pour éviter les bugs d'interpréteur du runner
|
||||
ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_home root@home.mesdonneesadministratives.fr "cd /opt/alapatch && git fetch --all && git reset --hard origin/main && docker build -t alapatch-prod . && if [ \$(docker ps -aq -f name=microkorg-editor) ]; then docker stop microkorg-editor && docker rm microkorg-editor; fi && docker run -d --restart unless-stopped -p 4321:4321 --name microkorg-editor alapatch-prod"
|
||||
# Ajout de -o BatchMode=yes et séparation des étapes pour forcer l'affichage des logs
|
||||
ssh -o StrictHostKeyChecking=no -o BatchMode=yes -i /root/.ssh/id_home root@home.mesdonneesadministratives.fr "
|
||||
cd /opt/alapatch &&
|
||||
echo '=> Fetching...' && git fetch --all &&
|
||||
echo '=> Resetting...' && git reset --hard origin/main &&
|
||||
echo '=> Building Docker...' && docker build -t alapatch-prod . &&
|
||||
echo '=> Cleaning old containers...' &&
|
||||
if [ \$(docker ps -aq -f name=microkorg-editor) ]; then
|
||||
docker stop microkorg-editor && docker rm microkorg-editor;
|
||||
fi &&
|
||||
echo '=> Running new container...' &&
|
||||
docker run -d --restart unless-stopped -p 4321:4321 --name microkorg-editor alapatch-prod
|
||||
"
|
||||
|
||||
echo "Le script de déploiement distant a été transmis avec succès."
|
||||
echo "Le script de déploiement distant a été exécuté."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user