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