forked from Rathore-Rajpal/Superbot-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
47 lines (36 loc) Β· 1016 Bytes
/
deploy.sh
File metadata and controls
47 lines (36 loc) Β· 1016 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
echo "π Starting deployment process..."
# Clean previous build
echo "π§Ή Cleaning previous build..."
rm -rf dist
# Install dependencies
echo "π¦ Installing dependencies..."
npm install
# Build the project
echo "π¨ Building project..."
npm run build
# Check if build was successful
if [ ! -d "dist" ]; then
echo "β Build failed! dist directory not found."
exit 1
fi
echo "β
Build completed successfully!"
echo "π Build output:"
ls -la dist/
# Create a simple server configuration for testing
echo "π Creating server configuration..."
cat > dist/_headers << EOF
/*
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
/*.js
Content-Type: application/javascript
/*.css
Content-Type: text/css
/*.html
Content-Type: text/html
EOF
echo "β
Deployment files ready!"
echo "π€ Upload the contents of the 'dist' folder to your hosting platform."
echo "π Make sure your hosting platform supports SPA routing."