-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-github-pages.sh
More file actions
executable file
Β·43 lines (32 loc) Β· 1.02 KB
/
deploy-github-pages.sh
File metadata and controls
executable file
Β·43 lines (32 loc) Β· 1.02 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# GitHub Pages deployment script
# This script builds the project for static hosting and deploys to GitHub Pages
set -e # Exit on any error
echo "π Starting GitHub Pages deployment..."
# Clean previous builds
echo "π§Ή Cleaning previous builds..."
rm -rf dist/
# Install dependencies if needed
if [ ! -d "node_modules" ]; then
echo "π¦ Installing dependencies..."
npm install
fi
# Build for production
echo "ποΈ Building for production..."
NODE_ENV=production npm run build:prod
# Verify build output
if [ ! -d "dist" ]; then
echo "β Build failed - dist directory not found"
exit 1
fi
if [ ! -f "dist/index.html" ]; then
echo "β Build failed - index.html not found"
exit 1
fi
echo "β
Build completed successfully"
# Deploy to GitHub Pages
echo "π Deploying to GitHub Pages..."
npm run deploy
echo "π Deployment completed!"
echo "π Your site should be available at: https://cargonriv.github.io/MLAI-Stack/"
echo "β³ Note: It may take a few minutes for changes to appear"