-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.07 KB
/
schedule-scrape.yml
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
41
42
name: Daily Scraping
on:
schedule:
# Runs every 24 hours at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch: # Allows you to manually trigger the workflow
inputs: {}
jobs:
run-dog-scrape:
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install supabase
pip install python-dotenv
python -m pip install requests
python -m pip install beautifulsoup4
# Run the scraping script
- name: Run Scraping
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
run: |
python scraping/dog_scrape.py
python scraping/cat_scrape.py