-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.11 KB
/
cron.yaml
File metadata and controls
40 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: UBC Court Sniper
on:
schedule:
- cron: '0 * * * *' # Runs exactly at minute 0 of every hour
workflow_dispatch: # Adds a "Run workflow" button for manual testing
jobs:
run-sniper:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip' # Caches pip packages to speed up runs
- name: Install dependencies
run: |
pip install -r requirements.txt
playwright install chromium
- name: Run Scraper
env:
# Database Secrets
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
# Notification Secrets
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
CHAT_ID: ${{ secrets.CHAT_ID }}
# Optional: PerfectMind Login (Uncomment if your scraper logs in)
# UB_USER: ${{ secrets.UB_USER }}
# UB_PASS: ${{ secrets.UB_PASS }}
run: python scraper.py