Scrape FBref match shooting #78
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 FBref match shooting | |
# After fb_match_results runs | |
on: | |
schedule: | |
- cron: "45 17 * 1-5,8-12 0,2,4" | |
jobs: | |
update-fb-match-shooting: | |
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", "tibble", "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", "fb_match_shooting", "update_fb_match_shooting.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" |