-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.35 KB
/
main.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
45
46
47
48
49
50
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ['**.Rmd']
schedule:
- cron: '0 0 * * Fri'
name: render-rmarkdown
jobs:
render-rmarkdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
DEVTO: ${{ secrets.DEVTO }}
steps:
- name: Install libcurl
run: >
sudo apt-get update && sudo apt-get install --yes
libcurl4-openssl-dev
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.1.2'
- uses: r-lib/actions/setup-renv@v2
- name: Render readme
run: Rscript -e 'rmarkdown::render("README.Rmd")'
- name: Commit rendered files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add README.md
# add files in README_files directory
git add graph.png
git status
git commit -m "Update the README" -a || echo "No changes to commit"
git status
git push origin || echo "No changes to commit"