Skip to content

run_extracts

run_extracts #204

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: run_extracts
# Controls when the action will run.
on:
schedule:
- cron: "30 12 * * 5"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
scrape-and-push:
# The type of runner that the job will run on
runs-on: macOS-latest
# retrieve token
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- name: Package Installation
run: Rscript -e 'install.packages(c("tidyverse" ,"devtools", "dplyr", "rvest", "httr", "stringr", "here", "xml2", "purrr", "janitor", "glue", "ratelimitr", "piggyback"))'
- name: worldfootballR Package Installation
run: Rscript -e 'devtools::install_github("JaseZiv/worldfootballR")'
- name: Updated Data
run: Rscript -e 'source(here::here("raw-data", "job_controller.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 data' || echo "No changes to commit"
git push || echo "No changes to commit"