Skip to content

Commit

Permalink
readding model install action
Browse files Browse the repository at this point in the history
  • Loading branch information
brycefrank committed Apr 11, 2024
1 parent 501d860 commit 532c1ba
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/models.install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: model-install

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {os: windows-latest, r: 'release'}
permissions:
contents: write

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
needs: check

- name: Clone allometric/allometric.
run: |
git clone https://github.com/allometric/allometric.git
- name: Install allometric, generate the models.RDS file.
run: |
devtools::install("./allometric", reload = FALSE);
library(allometric)
models <- ingest_models(FALSE, pub_path = "./publications", params_path = "./parameters");
warnings();
saveRDS(models, "./models.RDS")
shell: Rscript {0}

- uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Updating models.RDS
file_pattern: '*.RDS'

0 comments on commit 532c1ba

Please sign in to comment.