29 lines
822 B
YAML
29 lines
822 B
YAML
name: Deploy to home
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: [self-hosted, linux]
|
|
|
|
steps:
|
|
- name: Deploy via SSH
|
|
shell: bash
|
|
run: |
|
|
echo "Démarrage de la réplication vers le serveur distant..."
|
|
|
|
# Version ultra-légère : uniquement la synchronisation des fichiers Git
|
|
ssh -o StrictHostKeyChecking=no -o BatchMode=yes -i /root/.ssh/id_home root@home.mesdonneesadministratives.fr "
|
|
cd /opt/alapatch &&
|
|
echo '=> Synchronisation Git en cours...' &&
|
|
git fetch --all &&
|
|
git reset --hard origin/main &&
|
|
echo '=> Réplication des fichiers terminée avec succès.'
|
|
"
|
|
|
|
echo "Le pipeline Gitea Actions a fini son travail."
|