Skip to content

.github/workflows/render-rmarkdown.yaml #1626

.github/workflows/render-rmarkdown.yaml

.github/workflows/render-rmarkdown.yaml #1626

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
# every day, every 8 hours
- cron: '0 0/8 * * *'
jobs:
build:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.REM_DASHBOARD }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup R
uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- name: Render Rmarkdown files
run: |
install.packages(c("cranlogs", "rvest", "xml2", "htmltools", "httr2", "flexdashboard", "gh", "jsonlite", "lubridate", "dplyr", "purrr", "tibble", "reactable", "fontawesome", "tidyversedashboard", "tidyr"))
remotes::install_github("ThinkR-open/tidyversedashboard", ref = "zero-issues")
remotes::install_github("hadley/emo")
install.packages("easystats", repos = "https://easystats.r-universe.dev")
rmarkdown::render("dashboard.Rmd", output_dir = "public")
shell: Rscript {0}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.REM_DASHBOARD }}
publish_dir: ./public
force_orphan: true