Scrape fotmob matches by date #384
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
name: Scrape fotmob matches by date | |
# At 23:01 daily. | |
on: | |
schedule: | |
- cron: "1 23 * * *" | |
jobs: | |
update-fotmob-matches-by-date: | |
runs-on: macOS-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Package Installation | |
run: Rscript -e 'install.packages(c("devtools", "dplyr", "purrr", "tidyr", "lubridate", "janitor", "readr", "piggyback"))' | |
- name: worldfootballR Package Installation | |
run: Rscript -e 'devtools::install_github("JaseZiv/worldfootballR")' | |
- name: Update match results | |
run: Rscript -e 'source(file.path("R", "fotmob_matches_by_date", "update_fotmob_matches_by_date.R"), echo = TRUE)' | |
- name: Commit | |
run: | | |
git config --global user.name 'JaseZiv' | |
git config --global user.email 'jaseziv83@gmail.com' | |
git add . | |
git commit -m 'updating fotmob matches by date' || echo "No changes to commit" | |
git push || echo "No changes to commit" |