Skip to content

.github/workflows/nfl_per_pass_snap_update.yml #205

.github/workflows/nfl_per_pass_snap_update.yml

.github/workflows/nfl_per_pass_snap_update.yml #205

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 1,7 * 1,9,10,11,12 1,2,5,6'
workflow_dispatch:
name: Update-NFL-Snaps
jobs:
update-rosters:
name: Update-NFL-Snaps
runs-on: ubuntu-latest
env:
GITHUB_PAT: "${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
- name: Update-NFL-Snaps
run: Rscript -e 'source("R/snaps_nflverse.R")'
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git pull
git add -A
git commit -m "Update data" || echo "No changes to commit"
git push origin main || echo "No changes to commit"