Update Data #625
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: Update Data | |
on: | |
schedule: | |
- cron: "0 8 * * *" | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install Packages | |
run: | | |
install.packages(c("rsconnect", "automagic", "gh", "magrittr", "purrr", "tibble", "dplyr", "qs", "fs", "lubridate", "stringr")) | |
shell: Rscript {0} | |
- name: Update Data | |
run: | | |
source("get_github_stars.R") | |
shell: Rscript {0} | |
- name: Commit | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add --all | |
git commit -am "add data" | |
git push | |