Skip to content

Nightly Knit README.Rmd #180

Nightly Knit README.Rmd

Nightly Knit README.Rmd #180

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
name: Nightly Knit README.Rmd
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
- name: Install README.Rmd dependencies
run: |
Rscript -e 'install.packages(c("pak", "rmarkdown", "knitr"))'
- name: Install the local package
run: |
Rscript -e 'pak::local_install(".")'
- name: Render README.Rmd file
run: |
Rscript -e 'rmarkdown::render("README.Rmd", output_format = rmarkdown::github_document(html_preview = FALSE))'
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
commit-message: GH - Render README
title: GH - Render README
body: GH action to re-knit the README.Rmd
base: main
labels: ci/cd
branch: nightly_readme_build
delete-branch: true