Files
Kalshi_Polymarket/.github/workflows/alerts.yml
T
Casey Judice 5e6889ec7b Static dashboard via GitHub Pages (docs/) + GHA snapshot writes
Adds a phone-friendly public dashboard served from docs/ via GitHub Pages:
- docs/index.html, app.js, style.css: monthly + hourly tabs only, no
  positions/settings (positions stay on the local Mac UI). Reads
  ./data/scan.json and ./data/hourly.json instead of /api endpoints.
- gha_alerts.py also writes both snapshots to docs/data/ each cron tick.
- Workflow now commits docs/data/ alongside alerts_state.json.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 22:13:47 -04:00

49 lines
1.5 KiB
YAML

name: arb-alerts
# Runs the monthly-arb scanner every ~5 min on GitHub's runners and texts
# you (via your Apps Script SMS webhook) when a NEW arb opportunity appears.
# State (which arbs were already-alerted) lives in alerts_state.json and is
# committed back by the workflow itself so cron runs remember each other.
on:
schedule:
- cron: "*/5 * * * *" # 5-min cadence (GH min; expect ~5-15m lag)
workflow_dispatch: {} # manual "Run workflow" button in the UI
permissions:
contents: write # needed to commit alerts_state.json back
concurrency:
group: arb-alerts
cancel-in-progress: false # let an in-flight run finish before the next
jobs:
scan:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run alert poller
env:
SMS_WEBHOOK: ${{ secrets.SMS_WEBHOOK }}
SMS_PHONE: ${{ secrets.SMS_PHONE }}
SMS_CARRIER: ${{ secrets.SMS_CARRIER }}
run: python3 scripts/gha_alerts.py
- name: Commit state + dashboard snapshots if changed
run: |
git add alerts_state.json docs/data/ 2>/dev/null || true
if git diff --cached --quiet; then
echo "no changes to commit"
exit 0
fi
git config user.email "actions@users.noreply.github.com"
git config user.name "arb-alerts"
git commit -m "alerts+dashboard: refresh [skip ci]"
git push