Use GHA to check datasets and docs #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
paths: | |
- 'data-raw/generate_data.R' | |
- 'data-raw/corpus/*' | |
pull_request: | |
paths: | |
- 'data-raw/generate_data.R' | |
- 'data-raw/corpus/*' | |
name: dataset-check | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
dataset-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
r-version: 'renv' | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: | |
any::glue | |
any::scales | |
any::usethis | |
any::dplyr | |
any::readr | |
any::roxygen2 | |
extra-packages: | |
local::. | |
- name: Run Rscript | |
run: Rscript 'data-raw/generate_data.R' | |
- name: Update pull request | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Regenerate datasets and/or dataset documentation | |
file_pattern: 'R/data.R data/*.rda' |