-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
Β·43 lines (35 loc) Β· 1.01 KB
/
deploy.sh
File metadata and controls
executable file
Β·43 lines (35 loc) Β· 1.01 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
# FYNDAK Deployment Script
# Replace these with your actual FTP credentials
FTP_HOST="your-ftp-host.inleed.se"
FTP_USER="your-username"
FTP_PASS="your-password"
FTP_PATH="/public_html" # or wherever your web root is
echo "π Starting FYNDAK deployment..."
# Build the project
echo "π¦ Building project..."
npm run build
if [ $? -eq 0 ]; then
echo "β
Build successful!"
# Upload dist folder contents via FTP
echo "π€ Uploading files..."
# Using lftp for FTP upload (install with: brew install lftp)
lftp -c "
set ftp:ssl-allow no;
open -u $FTP_USER,$FTP_PASS $FTP_HOST;
lcd dist;
cd $FTP_PATH;
mirror --reverse --delete --verbose;
"
# Upload .htaccess separately
lftp -c "
set ftp:ssl-allow no;
open -u $FTP_USER,$FTP_PASS $FTP_HOST;
cd $FTP_PATH;
put .htaccess;
"
echo "π Deployment complete!"
echo "π Visit: https://fyndak.se"
else
echo "β Build failed! Please fix errors before deploying."
fi