Scrape fotmob match details #374
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 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 '[email protected]' | |
git add . | |
git commit -m 'updating fotmob match details' || echo "No changes to commit" | |
git push || echo "No changes to commit" |