Skip to content

Data scraping and collection #5350

Data scraping and collection

Data scraping and collection #5350

Workflow file for this run

name: Data scraping and collection
on:
schedule:
- cron: '0 * * * *' # This cron expression means "at the start of every hour"
push:
branches:
- main
jobs:
run-script:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout repository content
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run the script
run: |
python data/data_scraper.py
- name: Configure git
run: |
git config --global user.name 'Adegbehingbe Oluwakorede Joseph'
git config --global user.email '[email protected]'
- name: Commit recent data updates
run: |
git add data/aqi_data.csv
git commit -m "Update aqi_data.csv"
- name: Push data changes
run: |
git push origin main
# - uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: Update AQI data
# # branch: main