Skip to content

.github/workflows/run.yml #33

.github/workflows/run.yml

.github/workflows/run.yml #33

Workflow file for this run

on:
push:
schedule:
- cron: '53 20 * * 4' # every Thursday
workflow_dispatch:
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
with:
commit_message: "Automatic update of data table"
commit_user_name: "GitHub Action"
commit_user_email: "[email protected]"