Skip to content

Commit

Permalink
revert: move back to older restore logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Oct 17, 2023
1 parent f97af0b commit 3c13339
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
key: ${{ env.CACHE_KEY }}-${{ hashFiles(format('{0}/renv.lock', matrix.directory)) }}
restore-keys: ${{ env.CACHE_KEY }}-

- name: Update renv.lock file with updated packages
- name: Update renv.lock file with updated GitHub packages
shell: Rscript {0}
run: |
setwd("${{ matrix.directory }}")
Expand All @@ -99,16 +99,16 @@ jobs:
renv::record(sprintf(pkg_name_structure, package$RemoteUsername, package$Package))
}
}
lockfile_pkgs <- renv::lockfile_read()$Package
github_pkgs <- names(lockfile_pkgs)[sapply(lockfile_pkgs, function(x) x$Source == "GitHub")]
renv::update(exclude = github_pkgs)
- name: Restore R packages using renv and update the renv snapshot
- name: Install R packages using renv and update the renv snapshot
shell: Rscript {0}
working-directory: ${{ matrix.directory }}
run: |
options(renv.config.cache.symlinks = FALSE)
renv::restore()
lockfile_pkgs <- renv::lockfile_read()$Package
github_pkgs <- names(lockfile_pkgs)[sapply(lockfile_pkgs, function(x) x$Source == "GitHub")]
renv::restore(clean = TRUE)
renv::update(exclude = github_pkgs)
renv::snapshot()
- name: Print the new renv.lock file for ${{ matrix.directory }}
Expand Down

0 comments on commit 3c13339

Please sign in to comment.