Spaces:
Running
Running
Create .github/workflows/crawl-website.yml
Browse files
.github/workflows/crawl-website.yml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Weekly Website Crawler
|
2 |
+
|
3 |
+
on:
|
4 |
+
schedule:
|
5 |
+
- cron: '0 0 * * 0' # Runs at 00:00 every Sunday
|
6 |
+
workflow_dispatch: # Allows manual triggering
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
crawl:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
steps:
|
12 |
+
- uses: actions/checkout@v2
|
13 |
+
|
14 |
+
- name: Set up Python
|
15 |
+
uses: actions/setup-python@v2
|
16 |
+
with:
|
17 |
+
python-version: '3.10'
|
18 |
+
|
19 |
+
- name: Install dependencies
|
20 |
+
run: |
|
21 |
+
python -m pip install --upgrade pip
|
22 |
+
pip install crawl4ai huggingface_hub
|
23 |
+
|
24 |
+
- name: Run crawler
|
25 |
+
env:
|
26 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
27 |
+
run: python crawl_website.py
|