-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.06 KB
/
render_site.yaml
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
name: render-site
on:
workflow_dispatch:
push:
branches:
- main
- master
schedule:
- cron: "0 */12 * * *"
jobs:
render-and-commit:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- name: Install dependencies
run: |
Rscript -e 'install.packages(c("devtools", "dplyr", "reactable", "distill", "tidyr", "rmarkdown", "readr", "purrr", "stringr", "here", "httr", "rvest", "xml2", "lubridate", "cli"))'
- name: Run Script
run: Rscript -e 'source(here::here("scripts", "fetch_stats_script.R"))'
- name: Render site
run: Rscript -e 'rmarkdown::render_site(encoding = "UTF-8")'
- name: Commit
run: |
git config --global user.name 'James Day'
git config --global user.email '[email protected]'
git add .
git commit -m 'adding new stats' || echo "No changes to commit"
git push || echo "No changes to commit"