.github/workflows/main.yml #619
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: "*/10 * * * *" # every 5 minutes | |
push: | |
branches: main | |
name: Scrape R | |
jobs: | |
render: | |
name: Scrape R test | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Install dependencies | |
run: Rscript -e 'install.packages(c("tidyverse","rvest","dplyr","lubridate"))' | |
- name: Scrape the data | |
run: Rscript updated_election_scraper_2024.R | |
- name: Add and commit | |
id: add_commit | |
uses: EndBug/add-and-commit@v8 | |
with: | |
committer_name: Automated | |
committer_email: [email protected] | |
message: "Latest data" |