Skip to content

Commit

Permalink
📦 NEW: update deploy strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
thatbeautifuldream committed Apr 17, 2024
1 parent ded091e commit bac0f9b
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ docker build . -t ghcr.io/thatbeautifuldream/ai-roadmap-generator:latest && dock

# Check the exit status of the previous command
if [ $? -eq 0 ]; then
echo "Docker build and push successful"
else
echo "Docker build and push failed"
exit 1
fi

# Stop, remove, and start the container
docker stop ai-roadmap-generator
docker rm ai-roadmap-generator
docker run -d -p 3000:3000 --name ai-roadmap-generator ghcr.io/thatbeautifuldream/ai-roadmap-generator:latest
echo "Docker build and push successful"

# Check the exit status of the previous command
if [ $? -eq 0 ]; then
echo "Deployment successful"
# Call the webhook
webhook_response=$(curl -X POST -s https://manage.milind.live/api/stacks/webhooks/3737fba9-0cd2-47f0-83a2-37770cb910a4)
webhook_status=$?
if [ $webhook_status -eq 0 ]; then
echo "Webhook call successful"
else
echo "Webhook call failed: $webhook_response"
fi
else
echo "Deployment failed"
exit 1
echo "Docker build and push failed"
exit 1
fi

0 comments on commit bac0f9b

Please sign in to comment.