-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 1.6 KB
/
render-readme.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: render-readme
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- main
jobs:
render-readme:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v4
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rmarkdown, local::., any::allcontributors
- name: Update contributors
if: github.ref == 'refs/heads/main'
run: allcontributors::add_contributors(format = "text")
shell: Rscript {0}
- name: Compile the readme
run: |
rmarkdown::render("README.Rmd")
shell: Rscript {0}
- name: Upload README.md as an artifact
uses: actions/upload-artifact@v4
with:
name: readme
path: README.md
- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Automatic README update"
title: "Update README"
body: "This is an automated pull request to update the README."
branch: "update-readme-${{ github.run_number }}"
labels: "documentation"
reviewers: seabbs
add-paths: |
README.Rmd
README.md
token: ${{ secrets.GITHUB_TOKEN }}