File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run Scrapers
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 2 */3 * *' # Every 3 days at 2am UTC
6+ workflow_dispatch : # Allow manual trigger from GitHub Actions tab
7+
8+ jobs :
9+ scrape :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v4
18+ with :
19+ python-version : ' 3.11'
20+
21+ - name : Install dependencies
22+ run : |
23+ pip install requests beautifulsoup4 firebase-admin
24+
25+ - name : Run opportunity scraper
26+ run : python scrapers/scrape_opportunities.py
27+
28+ - name : Run course scraper
29+ run : python scrapers/scrape_courses.py
30+
31+ - name : Upload to Firestore
32+ env :
33+ FIREBASE_PROJECT_ID : ${{ secrets.FIREBASE_PROJECT_ID }}
34+ FIREBASE_PRIVATE_KEY : ${{ secrets.FIREBASE_PRIVATE_KEY }}
35+ FIREBASE_CLIENT_EMAIL : ${{ secrets.FIREBASE_CLIENT_EMAIL }}
36+ run : python scrapers/upload_to_firestore.py
You can’t perform that action at this time.
0 commit comments