-
Notifications
You must be signed in to change notification settings - Fork 94
42 lines (34 loc) · 1.07 KB
/
render-readme.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
on:
schedule:
- cron: "15 23 * * 4"
push:
paths:
- README.Rmd
name: Render README
jobs:
render:
if: github.repository_owner == 'european-modelling-hubs'
name: Render README
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-r@v2
with:
install-r: false
use-public-rspm: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install libudunits2-dev libcurl4-openssl-dev libgdal-dev
- uses: r-lib/actions/setup-renv@v2
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"