generated from gbif/doc-template
-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (38 loc) · 1.31 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
41
42
43
44
45
46
47
on:
push:
schedule:
- cron: '0 0 1 * *' # every month
jobs:
build:
runs-on: ubuntu-latest
name: run R script
env:
GBIF_USER: ${{ secrets.GBIF_USER }}
GBIF_PWD: ${{ secrets.GBIF_PWD }}
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("jhnwllr/gbifmt")
pak::pkg_install(c("httr2","tibble","tidyr","rgbif","readr","purrr","dplyr", "ascii"))
shell: Rscript {0}
- name: build table
run: Rscript build-table-script/R/table.R
# - name: update machine tags
# run: Rscript build-table-script/R/mt.R
- uses: stefanzweifel/git-auto-commit-action@v4