diff --git a/.github/workflows/models.install.yaml b/.github/workflows/models.install.yaml index e69de29..591a526 100644 --- a/.github/workflows/models.install.yaml +++ b/.github/workflows/models.install.yaml @@ -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' \ No newline at end of file