-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.12 KB
/
nightly-readme-build.yml
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
34
35
36
37
38
39
40
41
42
43
44
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