Skip to content

fix: use dynamic import for vite in development only (#4) #3

fix: use dynamic import for vite in development only (#4)

fix: use dynamic import for vite in development only (#4) #3

Workflow file for this run

name: Deploy to Dokku
on:
push:
branches: [main]
jobs:
deploy:
name: Deploy to Production
runs-on: ubuntu-latest
steps:
- name: Deploy to Dokku
run: |
echo "Triggering deployment for commit ${{ github.sha }}"
response=$(curl -s -w "%{http_code}" -o response.json \
-X POST https://server.tooangel.com/deploy/worlddriven-webapp \
-H "Authorization: Bearer ${{ secrets.DEPLOY_WEBHOOK_SECRET }}" \
-H "Content-Type: application/json" \
-d '{
"repository": "${{ github.repository }}",
"commit": "${{ github.sha }}",
"branch": "${{ github.ref_name }}"
}')
http_code="${response: -3}"
echo "HTTP Status Code: $http_code"
echo "Response:"
cat response.json
if [ "$http_code" -ne 200 ]; then
echo "Deployment failed with HTTP status: $http_code"
exit 1
fi
echo "Deployment triggered successfully!"
- name: Verify Deployment
run: |
echo "Waiting 30 seconds for deployment to complete..."
sleep 30
echo "Checking if worlddriven webapp is responding..."
response=$(curl -s -w "%{http_code}" -o health.json https://webapp.worlddriven.org/ || echo "000")
http_code="${response: -3}"
if [ "$http_code" = "200" ]; then
echo "✅ Deployment successful - worlddriven webapp is responding"
else
echo "⚠️ Warning: worlddriven webapp may still be starting (HTTP $http_code)"
echo "This doesn't necessarily mean deployment failed."
fi