From fb6376b11f7de00137cdbdbe196fa65a69ea485b Mon Sep 17 00:00:00 2001 From: Tony ElHabr Date: Wed, 15 Feb 2023 05:51:07 -0600 Subject: [PATCH] restore fotmob match details gha --- .../automated_fotmob_match_details.yml | 56 +++++++++---------- .../backfill_fb_match_shooting.R | 1 - 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/.github/workflows/automated_fotmob_match_details.yml b/.github/workflows/automated_fotmob_match_details.yml index 577c064..4683851 100644 --- a/.github/workflows/automated_fotmob_match_details.yml +++ b/.github/workflows/automated_fotmob_match_details.yml @@ -1,28 +1,28 @@ -# name: Scrape fotmob match details -# -# # At 23:31 daily. -# on: -# schedule: -# - cron: "31 23 * * *" -# -# jobs: -# update-fotmob-match-details: -# 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", "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_match_details", "update_fotmob_match_details.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 match details' || echo "No changes to commit" -# git push || echo "No changes to commit" +name: Scrape fotmob match details + +# At 23:31 daily. +on: + schedule: + - cron: "31 23 * * *" + +jobs: + update-fotmob-match-details: + 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", "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_match_details", "update_fotmob_match_details.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 match details' || echo "No changes to commit" + git push || echo "No changes to commit" diff --git a/R/fb_match_shooting/backfill_fb_match_shooting.R b/R/fb_match_shooting/backfill_fb_match_shooting.R index c3fa6b3..a1fce9b 100644 --- a/R/fb_match_shooting/backfill_fb_match_shooting.R +++ b/R/fb_match_shooting/backfill_fb_match_shooting.R @@ -31,7 +31,6 @@ possibly_scrape_fb_match_shooting <- possibly( quiet = FALSE ) -seasons <- 2019:2023 backfill_fb_match_shooting <- function(country, gender = 'M', tier = '1st', group = 'big5') { rds_path <- file.path(data_dir, sprintf('%s_%s_%s_match_shooting.rds', country, gender, tier))