Skip to content

render-site

render-site #2847

Workflow file for this run

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"