Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Phase 12 batch 6: F26 — jackpot tiers deliver advertised odds #23

Phase 12 batch 6: F26 — jackpot tiers deliver advertised odds

Phase 12 batch 6: F26 — jackpot tiers deliver advertised odds #23

Workflow file for this run

name: Deploy to Production
on:
push:
branches: [main]
paths:
- 'src/**'
- 'package.json'
- 'package-lock.json'
jobs:
deploy:
runs-on: ubuntu-latest
# Skip deploy if the server itself pushed this commit
if: ${{ !contains(github.event.head_commit.author.name, 'SnakeyBot') }}
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
script: |
set -e
cd ~/snakey
# Stash any local edits (agent may have been mid-patch)
git stash --include-untracked -m "auto-stash-before-deploy" 2>/dev/null || true
git fetch origin main
git reset --hard origin/main
npm install --omit=dev
~/.npm-global/bin/pm2 restart snakey --update-env
# Wait for health — poll up to 30s, server cold-start takes ~5-10s
for i in $(seq 1 15); do
if curl -sf http://localhost:3000/health > /dev/null; then
echo "Health check passed after ${i} attempts"
exit 0
fi
sleep 2
done
echo "Health check failed after 30s"
~/.npm-global/bin/pm2 logs snakey --lines 50 --nostream || true
exit 1