add deployment to build script
This commit is contained in:
parent
58a214444f
commit
df0a145f3b
1 changed files with 16 additions and 0 deletions
|
@ -2,6 +2,15 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
# Parse command line arguments
|
||||
DEPLOY=false
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
-d|--deploy) DEPLOY=true ;;
|
||||
*) echo "Unknown option: $arg"; echo "Usage: $0 [-d|--deploy]"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# CONFIGURATION
|
||||
REGISTRY="docker.botris.dev"
|
||||
USERNAME="johnbotris"
|
||||
|
@ -54,3 +63,10 @@ git push origin main
|
|||
git push origin "v$NEW_VERSION"
|
||||
|
||||
echo "🎉 Release v$NEW_VERSION complete."
|
||||
|
||||
# Step 6: Deploy if flag is set
|
||||
if [ "$DEPLOY" = true ]; then
|
||||
echo "🚀 Deploying to production..."
|
||||
ssh john@botris.social 'bash /home/john/docker/femto/update.sh'
|
||||
echo "✅ Deployment complete."
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue