mirror of
https://github.com/cjudice-commits/prediction-market-arb.git
synced 2026-07-27 13:37:46 +00:00
5e6889ec7b
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>
49 lines
1.5 KiB
YAML
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
|