Skip to content

Data Scraping

Data Scraping #2

Workflow file for this run

# .github/workflows/scraper.yml
name: Data Scraping
on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight
workflow_dispatch: # Allow manual triggering
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Dependencies
run: npm install
- name: Run Data Scrapers
run: |
node scraper/regionalDataScraper.js
node scraper/populationDataScraper.js
node scraper/mergeData.js
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add data/*.json
git commit -m "Automated data update"
git push
env:
GITHUB_TOKEN: ${{ secrets.SCRAPER_TOKEN }}