28 lines
554 B
Bash
Raw Normal View History

2024-10-06 17:24:53 +08:00
#!/bin/bash
echo "Running vite build..."
if vite build; then
echo "Vite build successful."
else
echo "Vite build failed. Exiting."
exit 1
fi
echo "Checking for changes to commit..."
if git diff-index --quiet HEAD --; then
2024-10-06 23:09:55 +08:00
2024-10-06 17:24:53 +08:00
if git commit -a; then
2024-10-06 23:09:55 +08:00
echo "Git commit successful."
else
echo "Git commit failed. Exiting."
exit 1
fi
else
echo "No changes to commit. Skipping commit."
2024-10-06 17:24:53 +08:00
fi
echo "Pushing changes to remote..."
if git push; then
echo "Git push successful."
else
echo "Git push failed. Exiting."
exit 1
fi