-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.15 KB
/
strikeauto.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
37
38
39
40
41
42
43
44
45
46
name: BBR Strike
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
jobs:
autoscrape:
# The type of runner that the job will run on
runs-on: macos-latest
# Load repo and install R
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-r@master
# Set-up R
- name: Install packages
run: |
R -e 'install.packages("tidyverse")'
R -e 'install.packages("janitor")'
R -e 'install.packages("rvest")'
R -e 'install.packages("broom", type="binary")'
# Run R script
- name: Scrape
run: Rscript strike.R
# Add new files in data folder, commit along with other modified files, push
- name: Commit files
run: |
git reset
git remote -v
git pull --rebase
git init
git config --local user.name github-actions
git config --local user.email "actions@github.com"
git add data/*
git commit -am "I strikeout $(date)"
git push origin main --force
env:
REPO_KEY: ${{secrets.GITHUB_TOKEN}}
username: github-actions