Merge branch 'master' of https://github.com/ISCAM4/ISCAM #13
This file contains hidden or 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
| name: Generate and Upload R Workspace | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-and-save-workspace: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| - name: Install dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| packages: | |
| any::devtools | |
| local::. | |
| - name: Generate RData workspace file | |
| run: | | |
| devtools::load_all() | |
| iscamdata <- ls(getNamespace("ISCAM"), all.names = TRUE) | |
| iscamdata <- c( | |
| iscamdata[ | |
| !iscamdata %in% | |
| c( | |
| ".__DEVTOOLS__", | |
| ".__NAMESPACE__.", | |
| ".__S3MethodsTable__.", | |
| ".packageName" | |
| ) | |
| ], | |
| "CloudSeeding", | |
| "Elephants", | |
| "FlintMDEQ", | |
| "Infant", | |
| "SleepDeprivation" | |
| ) | |
| save(list = iscamdata, file = "docs/ISCAM.RData") | |
| shell: Rscript {0} | |
| - name: Deploy site | |
| run: | | |
| git config --global user.name "${{ github.actor }}" | |
| git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
| git add docs | |
| git commit -m "Build and deploy pkgdown site [ci skip]" || exit 0 | |
| git push |