-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.07 KB
/
run.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
on:
push:
branches:
- main
schedule:
- cron: '0 0 1 * *' # every month
jobs:
build:
runs-on: ubuntu-latest
name: run R script
steps:
- uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.2'
- run: Rscript -e 'print("hello")'
- name: Cache R packages
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-
- name: Install pak
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/devel/")
shell: Rscript {0}
- name: Install dependencies
run: |
pak::pkg_install(c("rgbif","readr","purrr","dplyr", "ascii"))
shell: Rscript {0}
- name: build table script
run: Rscript R/stats.R
- uses: stefanzweifel/git-auto-commit-action@v4