Rename ROADMAP.md.md to ROADMAP.md #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🚀 MerphDev — CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 0 * * 1' # Chaque lundi à minuit — vérification hebdomadaire | |
| jobs: | |
| # ─── JOB 1 : VALIDATION DE LA STRUCTURE ─── | |
| validate: | |
| name: ✅ Validate Project Structure | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check required files exist | |
| run: | | |
| echo "Vérification de la structure du projet..." | |
| required_files=( | |
| "README.md" | |
| "learning-paths/cybersecurity.md" | |
| "learning-paths/ai-ml.md" | |
| "learning-paths/devops-cloud.md" | |
| "learning-paths/web-fullstack.md" | |
| "learning-paths/git-github.md" | |
| "certifications/README.md" | |
| "notebooks/README.md" | |
| "models/README.md" | |
| "docs/ROADMAP.md" | |
| ) | |
| all_ok=true | |
| for file in "${required_files[@]}"; do | |
| if [ ! -f "$file" ]; then | |
| echo "❌ MISSING: $file" | |
| all_ok=false | |
| else | |
| echo "✅ OK: $file" | |
| fi | |
| done | |
| if [ "$all_ok" = false ]; then | |
| echo "❌ Validation échouée — fichiers manquants" | |
| exit 1 | |
| fi | |
| echo "✅ Toute la structure est valide" | |
| - name: Validate Markdown syntax | |
| uses: markdownlint/markdownlint@v0.34.0 | |
| with: | |
| args: --config .markdownlint.json . | |
| continue-on-error: true | |
| # ─── JOB 2 : VÉRIFICATION DES LIENS ─── | |
| check-links: | |
| name: 🔗 Check External Links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install linkcheck tool | |
| run: npm install -g markdown-link-check | |
| - name: Check links in all markdown files | |
| run: | | |
| echo "Vérification des liens externes..." | |
| find . -name "*.md" -not -path "./node_modules/*" | while read file; do | |
| echo "─── Checking: $file ───" | |
| markdown-link-check "$file" --config .linkcheck.json || true | |
| done | |
| # ─── JOB 3 : GÉNÉRATION DU RAPPORT ─── | |
| report: | |
| name: 📊 Generate Progress Report | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Generate report | |
| run: | | |
| python3 << 'EOF' | |
| import os, json | |
| from datetime import datetime | |
| report = { | |
| "generated_at": datetime.now().isoformat(), | |
| "project": "MerphDev Learning & Certifications", | |
| "stats": {} | |
| } | |
| # Count markdown files per directory | |
| dirs_to_scan = ["learning-paths", "certifications", "notebooks", "models", "docs"] | |
| for d in dirs_to_scan: | |
| if os.path.exists(d): | |
| md_files = [f for f in os.listdir(d) if f.endswith('.md')] | |
| report["stats"][d] = len(md_files) | |
| with open("docs/latest-report.json", "w") as f: | |
| json.dump(report, f, indent=2) | |
| print("✅ Rapport généré:", json.dumps(report, indent=2)) | |
| EOF | |
| - name: Upload report as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: progress-report | |
| path: docs/latest-report.json | |
| # ─── JOB 4 : DÉPLOIEMENT ─── | |
| deploy: | |
| name: 🚀 Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: [validate, report] | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs | |
| publish_branch: gh-pages | |
| commit_message: "docs: deploy latest documentation [CI/CD]" |