-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (31 loc) · 962 Bytes
/
Copy pathdaily_scrape.yml
File metadata and controls
39 lines (31 loc) · 962 Bytes
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
name: Daily Job Scraper
on:
schedule:
- cron: '0 2 * * *' # Run daily at 2 AM UTC
workflow_dispatch: # Allow manual trigger
jobs:
scrape-jobs:
runs-on: ubuntu-latest
permissions:
contents: write # Needed to commit changes
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Browsers
run: npx puppeteer browsers install chrome
- name: Run Scraper
run: node scraper/scrape_jobs.js
- name: Commit and Push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add jobs.js
git commit -m "Update job listings [skip ci]" || echo "No changes to commit"
git push