1515Le projet SPAN SG utilise une architecture à 2 branches (` main ` , ` draft ` ) pour gérer staging et production :
1616
1717```
18- feature/update-sircom → PR → draft → /draft / (org-only)
18+ feature/update-sircom → PR → staging → /staging / (org-only)
1919 ↓
2020 PR draft → main → / (production)
2121```
@@ -36,7 +36,7 @@ feature/update-sircom → PR → draft → /draft/ (org-only)
3636### Objectifs migration
3737
3838- ** Simplifier workflow** : 1 branche cible unique (` main ` )
39- - ** Conserver 3 URLs** : local, /draft / (staging), / (production)
39+ - ** Conserver 3 URLs** : local, /staging / (staging), / (production)
4040- ** Réduire maintenance** : 67% réduction temps (6h/an → 2h/an)
4141- ** Améliorer observabilité** : Dashboard deployments centralisé
4242- ** Faciliter rollback** : Instantané (2 min au lieu de 10 min)
@@ -50,7 +50,7 @@ Migrer vers architecture **1 branche + 2 Environments GitHub** :
5050```
5151feature/update-sircom → PR → main
5252 ↓
53- Environment "staging" → /draft / (auto-deploy)
53+ Environment "staging" → /staging / (auto-deploy)
5454 ↓
5555 Approval Chef SNUM (manual gate)
5656 ↓
@@ -64,7 +64,7 @@ feature/update-sircom → PR → main
6464** Environments GitHub** :
65651 . ** staging**
6666 - Déploiement automatique sur push ` main `
67- - URL : https://alexmacapple.github.io/span-sg/draft /
67+ - URL : https://alexmacapple.github.io/span-sg/staging /
6868 - Accès : Org-only (inchangé)
6969 - Protection : Aucune (auto-deploy)
7070
@@ -76,7 +76,7 @@ feature/update-sircom → PR → main
7676
7777** Workflow CI/CD** : 1 job unique avec 3 étapes séquentielles
78781 . ` build-and-test ` : Linting + Tests + Security + Build HTML/PDF + E2E
79- 2 . ` deploy-staging ` : Deploy /draft / (needs: build-and-test)
79+ 2 . ` deploy-staging ` : Deploy /staging / (needs: build-and-test)
80803 . ` deploy-production ` : Deploy / (needs: build-and-test, environment: production)
8181
8282---
@@ -94,7 +94,7 @@ feature/update-sircom → PR → main
9494name : staging
9595deployment_branches : main
9696protection_rules : none
97- url : https://alexmacapple.github.io/span-sg/draft /
97+ url : https://alexmacapple.github.io/span-sg/staging /
9898
9999# Environment: production
100100name : production
@@ -217,7 +217,7 @@ jobs:
217217 runs-on : ubuntu-latest
218218 environment :
219219 name : staging
220- url : https://alexmacapple.github.io/span-sg/draft /
220+ url : https://alexmacapple.github.io/span-sg/staging /
221221 steps :
222222 - uses : actions/checkout@v3
223223 with :
@@ -236,12 +236,12 @@ jobs:
236236 name : exports
237237 path : exports/
238238
239- - name : Deploy to /draft / (staging)
239+ - name : Deploy to /staging / (staging)
240240 run : |
241241 git config user.name "github-actions[bot]"
242242 git config user.email "github-actions[bot]@users.noreply.github.com"
243243
244- # Nettoyer /draft / existant
244+ # Nettoyer /staging / existant
245245 rm -rf draft
246246 mkdir -p draft
247247
@@ -284,7 +284,7 @@ jobs:
284284 git config user.name "github-actions[bot]"
285285 git config user.email "github-actions[bot]@users.noreply.github.com"
286286
287- # Nettoyer racine (conserver /draft /)
287+ # Nettoyer racine (conserver /staging /)
288288 find . -mindepth 1 -maxdepth 1 ! -name 'draft' ! -name '.git' -exec rm -rf {} +
289289
290290 # Copier nouveau build
@@ -371,7 +371,7 @@ jobs:
371371- Les modifications passent par une **Pull Request** vers ` draft` pour validation.
372372+ Les modifications passent par une **Pull Request** vers `main` pour validation.
373373
374- - https://github.com/Alexmacapple/span-sg-repo/blob/draft /docs/modules/[votre-service].md
374+ - https://github.com/Alexmacapple/span-sg-repo/blob/staging /docs/modules/[votre-service].md
375375+ https://github.com/Alexmacapple/span-sg-repo/blob/main/docs/modules/[votre-service].md
376376
377377- **Base** : `draft` (important !)
@@ -381,9 +381,9 @@ jobs:
381381+
382382+ Après merge de votre PR sur `main` :
383383+
384- + 1. **Déploiement staging automatique** : Votre contribution est visible sur /draft / (org-only) sous 10 minutes
384+ + 1. **Déploiement staging automatique** : Votre contribution est visible sur /staging / (org-only) sous 10 minutes
385385+ 2. **Notification Chef SNUM** : Email automatique "Deployment to production pending"
386- + 3. **Approval Chef SNUM** : Review /draft / puis approve deployment (délai variable 0-60j)
386+ + 3. **Approval Chef SNUM** : Review /staging / puis approve deployment (délai variable 0-60j)
387387+ 4. **Déploiement production automatique** : Contribution visible publiquement sur / sous 5 minutes
388388` ` `
389389
@@ -398,14 +398,14 @@ flowchart TD
398398 A[Contributeur crée feature/update-sircom] --> B[Édite docs/modules/sircom.md]
399399 B --> C[git commit -m feat...]
400400 C --> D[git push origin feature/update-sircom]
401- D --> E[Créer PR vers draft ]
401+ D --> E[Créer PR vers staging ]
402402 E --> F[Review validateur 2-5j]
403403 F --> G{Approved?}
404404 G -->|Changes requested| H[Corriger]
405405 H --> C
406- G -->|Approved| I[Merge PR vers draft ]
406+ G -->|Approved| I[Merge PR vers staging ]
407407 I --> J[CI/CD build-deploy-draft]
408- J --> K[Deploy /draft / automatique]
408+ J --> K[Deploy /staging / automatique]
409409 K --> L[Accumulation contributions 30-60j]
410410 L --> M[Validateur crée PR draft → main]
411411 M --> N[Review Chef SNUM]
@@ -442,9 +442,9 @@ flowchart TD
442442 J --> K[E2E tests 300s]
443443 K --> L{Tests pass?}
444444 L -->|Failed| M[Investigation]
445- L -->|Success| N[Deploy staging /draft /]
445+ L -->|Success| N[Deploy staging /staging /]
446446 N --> O[Notification Chef SNUM]
447- O --> P[Chef SNUM review /draft /]
447+ O --> P[Chef SNUM review /staging /]
448448 P --> Q{Approve deployment?}
449449 Q -->|Not yet| R[Attente accumulation]
450450 R --> P
@@ -478,9 +478,9 @@ flowchart TD
478478
479479** Avant (2 branches)** :
480480```
481- J+0 09:00 : Contributeur crée PR vers draft
481+ J+0 09:00 : Contributeur crée PR vers staging
482482J+0 14:00 : Validateur approve et merge (5h review express)
483- J+0 14:10 : Deploy /draft / automatique
483+ J+0 14:10 : Deploy /staging / automatique
484484J+0 14:15 : Validateur crée PR draft → main
485485J+0 14:30 : Chef SNUM notifié
486486J+1 10:00 : Chef SNUM approve (19.5h délai nuit)
@@ -494,9 +494,9 @@ Total : 25h (1j 1h)
494494```
495495J+0 09:00 : Contributeur crée PR vers main
496496J+0 14:00 : Validateur approve et merge (5h review express)
497- J+0 14:10 : Deploy /draft / staging automatique
497+ J+0 14:10 : Deploy /staging / staging automatique
498498J+0 14:10 : Notification Chef SNUM "Deployment pending"
499- J+0 14:30 : Chef SNUM review /draft / puis approve (20 min)
499+ J+0 14:30 : Chef SNUM review /staging / puis approve (20 min)
500500J+0 14:35 : Deploy / production automatique
501501
502502Total : 5h35 (même jour)
@@ -508,9 +508,9 @@ Total : 5h35 (même jour)
508508
509509** Avant (2 branches)** :
510510```
511- J+0 : Contributeur crée PR vers draft
511+ J+0 : Contributeur crée PR vers staging
512512J+2 : Merge draft (2j review)
513- J+2 : Deploy /draft /
513+ J+2 : Deploy /staging /
514514J+2-60 : Accumulation 10 contributions
515515J+60 : Validateur crée PR draft → main
516516J+61 : Chef SNUM approve
@@ -523,7 +523,7 @@ Total : 61 jours
523523```
524524J+0 : Contributeur crée PR vers main
525525J+2 : Merge main (2j review)
526- J+2 : Deploy /draft / staging automatique
526+ J+2 : Deploy /staging / staging automatique
527527J+2 : Notification Chef SNUM
528528J+2-60 : Chef SNUM attend accumulation 10 contributions
529529J+60 : Chef SNUM approve deployment (batch)
@@ -591,14 +591,14 @@ Environment: production
591591
592592**Avant (2 workflows)** :
593593` ` `
594- Job draft : Linting → Tests → Security → Build → Deploy /draft /
594+ Job draft : Linting → Tests → Security → Build → Deploy /staging /
595595Job main : Linting → Tests → Security → Build → E2E → Deploy /
596596` ` `
597597
598598**Après (1 workflow, 3 jobs)** :
599599` ` `
600600Job 1 : Linting → Tests → Security → Build → E2E
601- Job 2 : Deploy /draft / (needs: Job 1)
601+ Job 2 : Deploy /staging / (needs: Job 1)
602602Job 3 : Deploy / (needs: Job 1, environment: production)
603603` ` `
604604
@@ -644,7 +644,7 @@ Job 3 : Deploy / (needs: Job 1, environment: production)
644644│ Status : ✅ Active │
645645│ Deployed : 2025-10-22 14:10 (02a52e7) │
646646│ Auto-deployed │
647- │ URL : https://alexmacapple.github.io/span-sg/draft / │
647+ │ URL : https://alexmacapple.github.io/span-sg/staging / │
648648└─────────────────────────────────────────────────────────────┘
649649```
650650
@@ -825,7 +825,7 @@ Total : 2-5 min (+ temps détection)
825825
826826 Avant d'approuver deployment production :
827827
828- - [ ] Review /draft / staging (navigation, contenu)
828+ - [ ] Review /staging / staging (navigation, contenu)
829829 - [ ] Vérifier E2E tests passés (GitHub Actions)
830830 - [ ] Vérifier aucune régression visuelle
831831 - [ ] Vérifier PDF exports/ généré
@@ -1151,7 +1151,7 @@ git tag -l | grep draft-archived
11511151
11521152# Remplacements globaux
11531153find docs/ -name " *.md" -type f -exec sed -i.bak \
1154- ' s/blob\/draft /blob\/main/g' {} \;
1154+ ' s/blob\/staging /blob\/main/g' {} \;
11551155
11561156find docs/ -name " *.md" -type f -exec sed -i.bak \
11571157 ' s/Base: `draft`/Base: `main`/g' {} \;
@@ -1193,8 +1193,8 @@ echo "✅ Documentation mise à jour (vérifier diffs avant commit)"
11931193 Job 2: deploy-staging → ✅ (2 min)
11941194 Job 3: deploy-production → ⏳ Waiting for approval
11951195
1196- # Vérifier /draft /
1197- https://alexmacapple.github.io/span-sg/draft /
1196+ # Vérifier /staging /
1197+ https://alexmacapple.github.io/span-sg/staging /
11981198 ```
11991199
120012003. **Approuver déploiement production (test)** :
@@ -1255,8 +1255,8 @@ echo "✅ Documentation mise à jour (vérifier diffs avant commit)"
12551255 curl -I http://localhost:8000/span-sg/
12561256 # Attendu : 200 OK
12571257
1258- # Staging /draft /
1259- curl -I https://alexmacapple.github.io/span-sg/draft /
1258+ # Staging /staging /
1259+ curl -I https://alexmacapple.github.io/span-sg/staging /
12601260 # Attendu : 200 OK
12611261
12621262 # Production /
@@ -1274,7 +1274,7 @@ echo "✅ Documentation mise à jour (vérifier diffs avant commit)"
12741274- [ ] Tag ` draft-archived-2025-10-22 ` vérifié
12751275- [ ] Branche ` draft ` supprimée (remote)
12761276- [ ] Branche ` draft ` supprimée (local)
1277- - [ ] 3 URLs vérifiées (local, /draft /, /)
1277+ - [ ] 3 URLs vérifiées (local, /staging /, /)
12781278
12791279#### Phase 6 : Communication (30 min)
12801280
@@ -1326,7 +1326,7 @@ echo "✅ Documentation mise à jour (vérifier diffs avant commit)"
13261326 Pour approuver un déploiement :
13271327 1 . Aller sur https://github.com/Alexmacapple/span-sg/deployments
13281328 2 . Cliquer environment "production" → Status "Pending"
1329- 3 . Review staging /draft / (preview avant production)
1329+ 3 . Review staging /staging / (preview avant production)
13301330 4 . Cliquer "Review deployment" → "Approve"
13311331 5 . Production déployée automatiquement sous 5 minutes
13321332
@@ -1359,7 +1359,7 @@ echo "✅ Documentation mise à jour (vérifier diffs avant commit)"
13591359 2 . Éditer docs/modules/[ service] .md
13601360 3 . Créer PR vers ` main ` (changement ici)
13611361 4 . Review validateur (2-5j, inchangé)
1362- 5 . Merge → deploy /draft / staging automatique
1362+ 5 . Merge → deploy /staging / staging automatique
13631363 6 . Approval Chef SNUM → deploy / production
13641364
13651365 ** Documentation** :
@@ -1471,7 +1471,7 @@ git push -u origin test/post-migration
14711471# Vérifier :
14721472- [ ] Deploy staging automatique (< 10 min)
14731473- [ ] Notification Chef SNUM reçue
1474- - [ ] /draft / accessible
1474+ - [ ] /staging / accessible
14751475```
14761476
14771477** Test 2 : Approval production** :
@@ -1537,15 +1537,15 @@ cp .github/workflows/build.yml.backup-2025-10-22 .github/workflows/build.yml
15371537
15381538**Architecture** :
15391539```
1540- feature → draft → /draft /
1540+ feature → staging → /staging /
15411541draft (batch) → main → /
15421542main → GitHub Action auto-sync → draft (automatique)
15431543```
15441544
15451545**Avantages** :
15461546- Conserve architecture 2 branches (familière)
15471547- Auto-sync évite divergence
1548- - Staging clair (/draft / = branche draft)
1548+ - Staging clair (/staging / = branche draft)
15491549
15501550**Inconvénients** :
15511551- Maintenance 2 workflows CI/CD (inchangé)
@@ -1560,7 +1560,7 @@ main → GitHub Action auto-sync → draft (automatique)
15601560**Architecture** :
15611561```
15621562feature → main
1563- Tag vX.Y.Z-rc → /draft / staging
1563+ Tag vX.Y.Z-rc → /staging / staging
15641564Tag vX.Y.Z → / production
15651565```
15661566
@@ -1660,7 +1660,7 @@ PR draft reviewed → Convert to main → Merge
166016602. **ROI rapide** : Rentabilisé après 11 mois
166116613. **Risques maîtrisés** : 4 risques identifiés avec mitigations
166216624. **Rollback possible** : Procédure revert si seuils échec atteints
1663- 5. **Conservation 3 URLs** : Objectif utilisateur respecté (local, /draft /, /)
1663+ 5. **Conservation 3 URLs** : Objectif utilisateur respecté (local, /staging /, /)
16641664
16651665**Conditions succès** :
16661666
@@ -1715,10 +1715,10 @@ La migration a nécessité 3 corrections itératives pour résoudre les conflits
17151715- Branches nettoyées : ` draft` , ` feature/migrate-github-environments` , ` feature/update-docs-environments` , ` feature/dsfr-poc`
17161716
17171717** Environments GitHub :**
1718- - ` staging` (ID: 9461952255) : déploiement automatique vers /draft / (org-only)
1718+ - ` staging` (ID: 9461952255) : déploiement automatique vers /staging / (org-only)
17191719 - Branch policy : main uniquement
17201720 - Reviewers : null (automatique)
1721- - URL : https://alexmacapple.github.io/span-sg/draft /
1721+ - URL : https://alexmacapple.github.io/span-sg/staging /
17221722
17231723- ` production` (ID: 9461976290) : déploiement séquentiel vers / (public)
17241724 - Branch policy : main uniquement
@@ -1728,7 +1728,7 @@ La migration a nécessité 3 corrections itératives pour résoudre les conflits
17281728** Workflow CI/CD Final :**
17291729` ` `
17301730Push main → build-and-test (~5min)
1731- ├─ deploy-staging → /draft / (~1min) [séquentiel]
1731+ ├─ deploy-staging → /staging / (~1min) [séquentiel]
17321732 └─ deploy-production → / (~1min) [séquentiel après staging]
17331733
17341734Temps total : ~ 7min (vs ~ 6-10min avant, acceptable pour fiabilité)
@@ -1738,12 +1738,12 @@ Temps total : ~7min (vs ~6-10min avant, acceptable pour fiabilité)
17381738
17391739** Tests post-migration (4/4 réussis) :**
174017401. Build réussit : ✓ (run 18721249064)
1741- 2. Staging déployé : ✓ (HTTP 200 sur /draft /)
1741+ 2. Staging déployé : ✓ (HTTP 200 sur /staging /)
174217423. Production déployé : ✓ (HTTP 200 sur /)
174317434. Workflow séquentiel : ✓ (staging avant production)
17441744
17451745** Sites opérationnels :**
1746- - Staging : https://alexmacapple.github.io/span-sg/draft / (last-modified: Wed, 22 Oct 2025 15:30:24 GMT)
1746+ - Staging : https://alexmacapple.github.io/span-sg/staging / (last-modified: Wed, 22 Oct 2025 15:30:24 GMT)
17471747- Production : https://alexmacapple.github.io/span-sg/ (last-modified: Wed, 22 Oct 2025 15:30:24 GMT)
17481748
17491749# ## Documentation Mise à Jour
@@ -1812,7 +1812,7 @@ Migration **RÉUSSIE** avec architecture finale **100% opérationnelle**. Les 3
18121812** État final validé :**
18131813- Tous les objectifs migration atteints
18141814- Aucune perte de fonctionnalité
1815- - 3 URLs conservées (local, /draft /, /)
1815+ - 3 URLs conservées (local, /staging /, /)
18161816- Documentation complète et à jour
18171817- Version taguée et tracée (v1.2.0-environments)
18181818
0 commit comments