param
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
cat > README.md << 'EOF'
|
||||
# 🛠️ Outils de développement
|
||||
|
||||
## Installation
|
||||
|
||||
Exécutez une seule fois après avoir cloné le repo :
|
||||
|
||||
./.devtools/install.sh
|
||||
|
||||
## Ré-installation si besoin
|
||||
|
||||
git config --global --unset alias.deploy
|
||||
./.devtools/install.sh
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
echo "🔧 Installation des commandes Git personnalisées..."
|
||||
|
||||
# Commande deploy
|
||||
git config --global alias.deploy '!f() {
|
||||
current_branch=$(git branch --show-current);
|
||||
echo "📍 Branche actuelle: $current_branch";
|
||||
echo "🔍 État avant auto-commit:";
|
||||
git status --short;
|
||||
|
||||
# Auto-commit des modifications si nécessaire
|
||||
if ! git diff-index --quiet HEAD --; then
|
||||
echo "💾 Auto-commit des modifications sur $current_branch...";
|
||||
git add .;
|
||||
git commit -m "Auto-commit for deploy to $1 - $(date +%Y-%m-%d\ %H:%M:%S)";
|
||||
echo "✅ Modifications commitées sur $current_branch !";
|
||||
else
|
||||
echo "ℹ️ Pas de modifications à commiter sur $current_branch";
|
||||
fi;
|
||||
|
||||
echo "🔍 État après auto-commit:";
|
||||
git status --short;
|
||||
echo "🔍 Dernier commit sur $current_branch:";
|
||||
git log --oneline -1;
|
||||
|
||||
if [ "$1" = "staging" ]; then
|
||||
echo "🚀 Push de $current_branch vers deploiement-staging...";
|
||||
git push origin $current_branch:deploiement-staging --force;
|
||||
echo "✅ Staging mis à jour avec le contenu de $current_branch !";
|
||||
elif [ "$1" = "production" ] || [ "$1" = "prod" ]; then
|
||||
echo "🚀 Déploiement en production...";
|
||||
git checkout main;
|
||||
git pull origin main;
|
||||
git merge $current_branch -m "Deploy from $current_branch to production";
|
||||
git push origin main;
|
||||
git checkout $current_branch;
|
||||
else
|
||||
echo "❌ Usage: git deploy [staging|production]";
|
||||
return 1;
|
||||
fi;
|
||||
|
||||
echo "🔍 Vous êtes toujours sur: $(git branch --show-current)";
|
||||
echo "✅ Déployé sur $1 !";
|
||||
}; f'
|
||||
|
||||
# Commande publish
|
||||
git config --global alias.publish '!f() {
|
||||
current_branch=$(git branch --show-current);
|
||||
git push origin $current_branch;
|
||||
echo "✅ Branche $current_branch publiée !";
|
||||
echo "👉 Créez votre PR dans Gitea : $current_branch → main";
|
||||
}; f'
|
||||
|
||||
# Commande cleanup
|
||||
git config --global alias.cleanup '!f() {
|
||||
current_branch=$(git branch --show-current);
|
||||
git checkout main;
|
||||
git pull origin main;
|
||||
git branch -d $current_branch 2>/dev/null;
|
||||
git push origin --delete $current_branch 2>/dev/null;
|
||||
echo "🧹 Nettoyage terminé !";
|
||||
}; f'
|
||||
|
||||
echo "✅ Commandes Git installées !"
|
||||
echo "📖 Utilisation :"
|
||||
echo " git deploy staging # → Teste sur staging"
|
||||
echo " git deploy production # → Déploie en prod"
|
||||
echo " git publish # → Publie pour PR"
|
||||
echo " git cleanup # → Nettoie après merge"
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo "🔧 Installation de l'environnement de développement..."
|
||||
|
||||
# Installer les aliases Git
|
||||
source .devtools/git-aliases.sh
|
||||
|
||||
# Ajouter .devtools au gitignore local (pas versionné)
|
||||
echo "/.devtools/" >> .git/info/exclude
|
||||
|
||||
echo "✅ Installation terminée !"
|
||||
echo "ℹ️ Les outils de dev sont maintenant ignorés localement"
|
||||
echo "🚀 Vous pouvez maintenant utiliser: git deploy staging"
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Proposer une nouvelle fonctionnalité ou amélioration
|
||||
title: '[FEATURE] '
|
||||
labels: 'enhancement, needs-review'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## 🎯 Objectif
|
||||
<!-- Décrivez clairement l'objectif de cette fonctionnalité -->
|
||||
**Quel est le problème que cette fonctionnalité résout ?**
|
||||
|
||||
|
||||
**Quelle valeur ajoutée apporte-t-elle aux utilisateurs ?**
|
||||
|
||||
|
||||
## 📝 Description détaillée
|
||||
<!-- Décrivez précisément la fonctionnalité demandée -->
|
||||
**Fonctionnalité souhaitée :**
|
||||
|
||||
|
||||
**Contexte d'utilisation :**
|
||||
<!-- Dans quelles situations cette fonctionnalité sera-t-elle utilisée ? -->
|
||||
|
||||
|
||||
## 🎨 Éléments visuels
|
||||
<!-- Ajoutez des maquettes, wireframes, captures d'écran ou schémas si disponibles -->
|
||||
|
||||
|
||||
## ✅ Critères d'acceptation
|
||||
<!-- Listez les conditions qui doivent être remplies pour considérer cette fonctionnalité comme terminée -->
|
||||
|
||||
### Fonctionnalités principales
|
||||
- [ ] Critère 1 :
|
||||
- [ ] Critère 2 :
|
||||
- [ ] Critère 3 :
|
||||
|
||||
### Interface utilisateur
|
||||
- [ ] L'interface est intuitive et cohérente avec le design existant
|
||||
- [ ] La fonctionnalité est accessible (WCAG)
|
||||
- [ ] L'interface s'adapte aux différentes tailles d'écran (responsive)
|
||||
|
||||
### Performance et technique
|
||||
- [ ] Les temps de réponse sont inférieurs à X secondes
|
||||
- [ ] La fonctionnalité est compatible avec les navigateurs supportés
|
||||
- [ ] Les données sont validées côté client et serveur
|
||||
|
||||
### Tests et documentation
|
||||
- [ ] Tests unitaires écrits et passants
|
||||
- [ ] Tests d'intégration réalisés
|
||||
- [ ] Documentation utilisateur mise à jour
|
||||
- [ ] Documentation technique rédigée
|
||||
|
||||
## 🔧 Considérations techniques
|
||||
**Impact estimé :**
|
||||
- [ ] Faible (quelques heures)
|
||||
- [ ] Moyen (quelques jours)
|
||||
- [ ] Important (quelques semaines)
|
||||
|
||||
## 📋 Informations complémentaires
|
||||
**Priorité souhaitée :**
|
||||
- [ ] Critique (bloquant)
|
||||
- [ ] Haute (important)
|
||||
- [ ] Moyenne (souhaitable)
|
||||
- [ ] Basse (nice-to-have)
|
||||
|
||||
**Contacts :**
|
||||
<!-- Personnes à contacter pour plus d'informations -->
|
||||
- Demandeur :
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Deploy to Staging and Production
|
||||
on:
|
||||
push:
|
||||
branches: [main, deploiement-staging]
|
||||
|
||||
jobs:
|
||||
deploy-staging:
|
||||
if: github.ref == 'refs/heads/deploiement-staging'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy to Staging
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
|
||||
with:
|
||||
server: ${{ secrets.FTP_SERVER_PERCOLOUCO }}
|
||||
username: ${{ secrets.FTP_USERNAME_PERCOLOUCO }}
|
||||
password: ${{ secrets.FTP_PASSWORD_PERCOLOUCO }}
|
||||
local-dir: ./
|
||||
server-dir: /www/staging/ # ← Nouveau chemin
|
||||
|
||||
deploy-production:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy to Production
|
||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
|
||||
with:
|
||||
server: ${{ secrets.FTP_SERVER_PERCOLOUCO }}
|
||||
username: ${{ secrets.FTP_USERNAME_PERCOLOUCO }}
|
||||
password: ${{ secrets.FTP_PASSWORD_PERCOLOUCO }}
|
||||
local-dir: ./
|
||||
server-dir: /www/mh/ # ← Production reste ici
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["esbenp.prettier-vscode"]
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "explicit"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user