-
Notifications
You must be signed in to change notification settings - Fork 39
47 lines (37 loc) · 1.19 KB
/
knit_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
name: Knit readme
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
knit:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install cURL Headers
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.0'
- name: Serup renv
uses: r-lib/actions/setup-renv@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Render readme files
run: rmarkdown::render("README.Rmd", output_format = "github_document")
shell: Rscript {0}
- name: Commit data
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit README.md -m 'Update README list' || echo "No changes to commit"
git push origin || echo "Nothing to push"