-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-github-pages.ps1
More file actions
26 lines (22 loc) · 953 Bytes
/
build-github-pages.ps1
File metadata and controls
26 lines (22 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Script de build pour GitHub Pages - Sacercode
Write-Host "🚀 Construction du site Sacercode pour GitHub Pages..." -ForegroundColor Green
# Nettoyage du dossier docs s'il existe
if (Test-Path "docs") {
Write-Host "🧹 Nettoyage du dossier docs..." -ForegroundColor Yellow
Remove-Item -Recurse -Force "docs"
}
# Installation des dépendances
Write-Host "📦 Installation des dépendances..." -ForegroundColor Blue
npm install
# Build du projet
Write-Host "🔨 Construction du projet..." -ForegroundColor Blue
$env:NODE_ENV = "production"
npm run build
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ Build terminé avec succès!" -ForegroundColor Green
Write-Host "📁 Les fichiers sont prêts dans le dossier /docs" -ForegroundColor Green
Write-Host "🌐 Vous pouvez maintenant pousser vers GitHub et configurer Pages" -ForegroundColor Cyan
} else {
Write-Host "❌ Erreur lors du build" -ForegroundColor Red
exit 1
}