mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 18:07:50 +08:00
36 lines
668 B
Bash
Executable File
36 lines
668 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
VERSION=$1
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
echo "Usage: ./scripts/deploy.sh v1.2.0"
|
|
exit 1
|
|
fi
|
|
|
|
echo "🔨 Building $VERSION..."
|
|
# Remove old build files but keep .git
|
|
rm -rf dist/assets dist/index.html dist/*.js dist/*.css dist/vite.svg
|
|
|
|
bun run build
|
|
|
|
echo "📄 Adding README..."
|
|
if [ -f public/README.md ]; then
|
|
cp public/README.md dist/README.md
|
|
fi
|
|
|
|
echo "📦 Deploying to GitHub Pages..."
|
|
cd dist
|
|
|
|
git add .
|
|
git commit -m "Deploy $VERSION" || echo "No changes to commit"
|
|
git push
|
|
|
|
cd ..
|
|
|
|
echo "✅ Deployed to https://kccleoc.github.io/seedpgp-web-app/"
|
|
echo ""
|
|
echo "Tag private repo:"
|
|
echo " git tag $VERSION && git push origin --tags"
|