Skip to content

Update compile_main_fredi_data.yml #27

Update compile_main_fredi_data.yml

Update compile_main_fredi_data.yml #27

### https://github.com/actions/upload-artifact
### https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows/
### https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
### https://github.com/r-lib/actions/tree/v2/setup-r-dependencies
### https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution
### For uploading artifacts:
### "path:" is the output path where Pandoc will write the compiled PDF.
### Note, this should be the same directory as the input paper.md
name: Compile FrEDI Data
# on: [push]
on:
push:
inputs:
repo_url:
description: FrEDI repo URL
required: true
default:
# update:
# type: choice
# description: Update sysdata.rda
# options:
# - no
# - yes
jobs:
compile_data:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
name: Process Data
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Setup R package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: true
cache-version: 1
packages: |
any::tidyverse
any::remotes
any::openxlsx
any::devtools
- name: Install FrEDI
run: |
require(remotes)
require(devtools)
Rscript -e 'install_github(
repo = "https://github.com/USEPA/FrEDI",
subdir = "FrEDI",
ref = "main",
type = "source",
repos = getOption("repos"),
upgrade = "never",
force = TRUE
)'
- name: Run createsystemData
run: |
Rscript -e 'source("./scripts/createSystemData_main.R")'
- name: Upload Tests
uses: actions/upload-artifact@v3
with:
name: Data
path: |
./data_tests/
./data/tmp_sysdata.rda