Skip to content

.github/workflows/run.yml #58

.github/workflows/run.yml

.github/workflows/run.yml #58

Workflow file for this run

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