forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.06 KB
/
baseball.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: autobaseball
on:
workflow_dispatch:
jobs:
run-autobaseball:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
- name: Restore R package cache
id: cache-r-packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('install-packages.R') }}-1
- name: Install packages
if: steps.cache-r-packages.outputs.cache-hit != 'true'
run: R -e 'source("install-packages.R", echo = TRUE)'
- name: Download Parse and Update Chart Data
run: Rscript baseball.R
# Add new files in folder, commit along with other modified files, push
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push