Spaces:
Running
Running
File size: 504 Bytes
eec97a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/bin/bash
# Build the project
npm run build
# Ensure the dist directory exists
if [ -d "dist" ]; then
# Copy all files from dist to the root, but not overwrite the src and public directories
cp -r dist/* .
# Optionally, clean up the dist directory after copying
rm -rf dist
else
echo "Build directory 'dist' does not exist. Please run 'npm run build' first."
exit 1
fi
# Add, commit, and push changes to the repository
git add .
git commit -m "Deploy build"
git push origin main --force
|