-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·35 lines (26 loc) · 844 Bytes
/
deploy.sh
File metadata and controls
executable file
·35 lines (26 loc) · 844 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
#!/bin/bash
set -euo
echo "[+] Removing old dist..."
rm -rf dist
echo "[+] Building site locally..."
rm -rf build
parklife build
echo "[+] Build -->> dist"
mv build dist
echo "[+] Copying build-assets into dist..."
mkdir -p dist/assets
cp -r build-assets/* dist/assets/
echo "[+] Checking for CSS and images..."
echo "🔍 Checking for CSS and images..."
if [ -z "$(find dist/assets -type f -name '*.css')" ]; then
echo "❌ ERROR: No CSS files found in dist/assets."
exit 1
fi
if [ -z "$(find dist/assets -type f \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.gif' \))" ]; then
echo "❌ ERROR: No image files found in dist/assets."
exit 1
fi
echo "[+] Build-assets check passed!"
echo "[+] Deploying build to Netlify..."
netlify deploy --prod --dir=dist --debug
echo "[+] Site deployed successfully!"