Skip to content

Fix: restore closing })(); for main async IIFE in asset detail #93

Fix: restore closing })(); for main async IIFE in asset detail

Fix: restore closing })(); for main async IIFE in asset detail #93

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DO_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ secrets.DO_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to DigitalOcean
run: |
ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o ServerAliveCountMax=60 ${{ secrets.DO_USER }}@${{ secrets.DO_HOST }} << 'DEPLOY'
set -e
cd /opt/renzora-website
# Pull latest code
git fetch origin main
git reset --hard origin/main
# Fetch latest preview WASM from engine releases
mkdir -p assets/wasm
PREVIEW_URL=$(curl -sf "https://api.github.com/repos/${{ secrets.ENGINE_REPO }}/releases/latest" \
| grep -o '"browser_download_url": "[^"]*renzora-preview-wasm[^"]*"' \
| head -1 | cut -d'"' -f4 || true)
if [ -n "$PREVIEW_URL" ]; then
echo "Downloading preview WASM from: $PREVIEW_URL"
curl -sfL "$PREVIEW_URL" -o /tmp/preview-wasm.zip
unzip -o /tmp/preview-wasm.zip -d assets/wasm/ 2>/dev/null || true
rm -f /tmp/preview-wasm.zip
else
echo "Warning: Could not fetch preview WASM — skipping"
fi
# Build and deploy
docker compose -f docker-compose.prod.yml build app
docker compose -f docker-compose.prod.yml up -d --remove-orphans
# Wait for health check
echo "Waiting for health check..."
for i in $(seq 1 30); do
if curl -sf http://localhost/health > /dev/null 2>&1; then
echo "Health check passed"
break
fi
if [ $i -eq 30 ]; then
echo "Health check failed after 30 attempts"
docker compose -f docker-compose.prod.yml logs app --tail=50
exit 1
fi
sleep 2
done
# Cleanup old images
docker image prune -f
echo "Deploy successful"
DEPLOY
timeout-minutes: 30