This commit is contained in:
@@ -16,17 +16,17 @@ jobs:
|
||||
run: |
|
||||
echo "Démarrage de la connexion et réplication Git native..."
|
||||
|
||||
# La commande principale utilise id_home car la clé est sur le RUNNER
|
||||
ssh -o StrictHostKeyChecking=no -o BatchMode=yes -i /root/.ssh/id_ed25519 root@home.mesdonneesadministratives.fr "
|
||||
# La commande principale REPREND id_home car cette clé appartient au RUNNER
|
||||
ssh -o StrictHostKeyChecking=no -o BatchMode=yes -i /root/.ssh/id_home root@home.mesdonneesadministratives.fr "
|
||||
cd /opt/alapatch &&
|
||||
|
||||
echo '=> [1/4] Configuration du Remote en SSH natif...' &&
|
||||
git remote set-url origin git@git.mesdonneesadministratives.fr:cvancau/alapatch.git || git remote add origin git@git.mesdonneesadministratives.fr:cvancau/alapatch.git &&
|
||||
|
||||
echo '=> [2/4] Synchronisation Git native...' &&
|
||||
# On retire le -i /root/.ssh/id_home car le serveur 'home' utilise sa clé par défaut
|
||||
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -o BatchMode=yes' git fetch --all &&
|
||||
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -o BatchMode=yes' git reset --hard origin/main &&
|
||||
echo '=> [2/4] Synchronisation Git native avec la clé ed25519 du serveur...' &&
|
||||
# Ici, le serveur 'home' utilise sa propre clé id_ed25519 locale pour parler à Gitea
|
||||
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -o BatchMode=yes -i /root/.ssh/id_ed25519' git fetch --all &&
|
||||
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -o BatchMode=yes -i /root/.ssh/id_ed25519' git reset --hard origin/main &&
|
||||
git clean -fd &&
|
||||
|
||||
echo '=> [3/4] Build de l-image Docker (Node 22 / Vite)...' &&
|
||||
|
||||
Reference in New Issue
Block a user