diff --git a/.gitea/workflows/deploy-android.yaml b/.gitea/workflows/deploy-android.yaml index dd30d54..a0795e3 100644 --- a/.gitea/workflows/deploy-android.yaml +++ b/.gitea/workflows/deploy-android.yaml @@ -23,31 +23,36 @@ jobs: echo "${{ secrets.FIREBASE_CREDENTIALS }}" > ./android/firebase_credentials.json echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > ./android/key.properties - - name: Lancer Fastlane (Mode Local Strict) + - name: Lancer Fastlane (Avec Ruby Homebrew Forcé) working-directory: ./android env: ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} FIREBASE_ANDROID_APP_ID: ${{ secrets.FIREBASE_ANDROID_APP_ID }} run: | - # --- 🛡️ PROTECTION ANTI-SYSTÈME 🛡️ --- - # On définit un dossier local pour TOUS les gems (Bundler inclus) - # Cela empêche physiquement le script d'aller voir dans /Library/Ruby/Gems/2.6.0 + # --- 🚨 INJECTION DU CHEMIN RUBY 🚨 --- + # On force le système à regarder dans ton dossier Homebrew EN PREMIER + # C'est ce qui permet d'éviter le Ruby 2.6 du système + export PATH="/opt/homebrew/opt/ruby/bin:$PATH" + + # Preuve que ça marche (ça doit afficher Ruby 3.x ou 4.x dans les logs) + echo "Version de Ruby active :" + ruby -v + + # --- Configuration Locale des Gems --- + # On installe tout dans un dossier local pour éviter les "Permission denied" export GEM_HOME=$PWD/vendor/bundle export GEM_PATH=$PWD/vendor/bundle export PATH=$GEM_HOME/bin:$PATH - echo "📂 Dossier des Gems forcé à : $GEM_HOME" - # Nettoyage de sécurité - rm -rf vendor - rm -f Gemfile.lock + rm -rf vendor Gemfile.lock - echo "⬇️ Installation de Bundler (en local)..." - # Cette commande va maintenant écrire dans ./android/vendor/bundle et non dans le système + # Installation + echo "Installation de Bundler..." gem install bundler - echo "📦 Installation des dépendances..." - bundle install --jobs 4 --retry 3 + echo "Installation des dépendances..." + bundle install - echo "🚀 Lancement..." + echo "Lancement..." bundle exec fastlane deploy_firebase \ No newline at end of file