From 3c13339d6f1769cd53a310f8b8a43fcf02860070 Mon Sep 17 00:00:00 2001 From: vedhav Date: Tue, 17 Oct 2023 13:22:48 +0530 Subject: [PATCH] revert: move back to older restore logic --- .github/workflows/deploy.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 08aceed7..8d3dabde 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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 }}") @@ -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 }}