generated from statOmics/Rmd-website
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (32 loc) · 1.07 KB
/
update-install-R.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
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Runs the update_install_R.R script and commits the result
on:
push:
branches:
- "master"
paths:
- "renv.lock"
name: Update install.R
jobs:
update-install_R:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: r-lib/actions/setup-r@v2
- name: Install dependencies
run: |
Rscript --vanilla -e 'install.packages(c("renv", "jsonlite", "yaml"), repos = "https://cloud.r-project.org")'
- name: Update install.R script
run: |
Rscript --vanilla update_install_R.R
- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit install.R -m 'Update install.R' || echo "No changes to commit"
git push origin || echo "No changes to commit"