script
This commit is contained in:
parent
1ff437b7e6
commit
12d3b53fe2
26
deploy.sh
26
deploy.sh
@ -133,8 +133,30 @@ echo "✅ Directory structure created"
|
|||||||
|
|
||||||
# Copy built application
|
# Copy built application
|
||||||
echo "📋 Copying application files..."
|
echo "📋 Copying application files..."
|
||||||
cp -r dist/* "$WEBROOT/"
|
if [ -d "dist" ] && [ "$(ls -A dist)" ]; then
|
||||||
echo "✅ Application files copied ($(du -sh dist | cut -f1))"
|
# Use rsync for better copying, or fallback to cp
|
||||||
|
if command -v rsync &> /dev/null; then
|
||||||
|
rsync -av --delete dist/ "$WEBROOT/"
|
||||||
|
echo "✅ Application files copied via rsync ($(du -sh dist | cut -f1))"
|
||||||
|
else
|
||||||
|
# More reliable copy method
|
||||||
|
cp -r dist/. "$WEBROOT/"
|
||||||
|
echo "✅ Application files copied via cp ($(du -sh dist | cut -f1))"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify copy was successful
|
||||||
|
if [ ! -f "$WEBROOT/index.html" ] && [ ! -d "$WEBROOT/server" ]; then
|
||||||
|
echo "❌ Error: Application files not properly copied"
|
||||||
|
echo "🔍 Dist contents: $(ls -la dist/)"
|
||||||
|
echo "🔍 Webroot contents: $(ls -la $WEBROOT/)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "❌ Error: dist/ directory is empty or doesn't exist"
|
||||||
|
echo "🔍 Current directory: $(pwd)"
|
||||||
|
echo "🔍 Contents: $(ls -la)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy essential data files
|
# Copy essential data files
|
||||||
echo "🗂️ Setting up data files..."
|
echo "🗂️ Setting up data files..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user