Skip to content

Daily Run

Daily Run #496

Workflow file for this run

name: Daily Run
on:
schedule:
- cron: '40 11 * * *' # Runs every day at 6:40 AM EST (11:40 UTC)
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Update system dependencies
run: sudo apt-get update
- name: Remove Chrome
run: sudo apt purge google-chrome-stable
- name: Install Google Chrome
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
# Set up Chromedriver to match the installed version of Chrome
- name: Setup Chromedriver
uses: nanasess/setup-chromedriver@v2
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run script
run: python run_scraper.py
- name: Configure git
run: |
git config --global user.email "actions-user@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Commit changes
env:
TZ: America/New_York
run: |
CURRENT_DATE=$(date +"%m/%d/%Y")
git add .
git commit -m "run ($CURRENT_DATE)" -a || echo "No changes to commit"
git push