Skip to content

Cache renv dependencies earlier in docs workflows#714

Merged
d-morrison merged 2 commits into
mainfrom
copilot/cache-dependencies-after-install
May 13, 2026
Merged

Cache renv dependencies earlier in docs workflows#714
d-morrison merged 2 commits into
mainfrom
copilot/cache-dependencies-after-install

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor

Docs workflows were only persisting dependency cache in post-job behavior, so runs that failed/cancelled during render could miss cache saves. This updates the workflow cache mode so dependency cache is written immediately after restore/install, before long render stages.

  • Workflow cache timing

    • Updated docs-rendering workflows to use explicit non-post-job cache behavior in setup-renv:
      • .github/workflows/preview.yml
      • .github/workflows/publish.yml
  • Behavioral impact

    • Ensures dependency cache is available to subsequent runs even if render steps fail or are interrupted.
    • Aligns cache persistence timing with the referenced approach.
  • Configuration change

    - uses: r-lib/actions/setup-renv@v2
      env:
        GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
      with:
        bypass-cache: never

see https://github.com/r-lib/actions/tree/v2-branch/setup-renv#usage for details

Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 02:59
Copilot AI linked an issue May 13, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/64351220-7227-44c8-8c06-3e65e0c80e13

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 03:06
Copilot AI changed the title [WIP] Update docs workflow to cache dependencies immediately after installation Cache renv dependencies earlier in docs workflows May 13, 2026
Copilot AI requested a review from d-morrison May 13, 2026 03:07
@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-05-13 03:26 UTC

@d-morrison d-morrison marked this pull request as ready for review May 13, 2026 03:24
Copilot AI review requested due to automatic review settings May 13, 2026 03:24
@d-morrison d-morrison merged commit c0ab94d into main May 13, 2026
5 checks passed
@d-morrison d-morrison deleted the copilot/cache-dependencies-after-install branch May 13, 2026 03:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation-rendering GitHub Actions workflows to configure r-lib/actions/setup-renv@v2 with an explicit cache setting, aiming to ensure the renv dependency cache is persisted even when long render stages fail or are cancelled.

Changes:

  • Add with: bypass-cache: never to the setup-renv@v2 step in the publish workflow.
  • Add with: bypass-cache: never to the setup-renv@v2 step in the preview workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/publish.yml Adds bypass-cache: never to the setup-renv@v2 step used before render/deploy.
.github/workflows/preview.yml Adds bypass-cache: never to the setup-renv@v2 step used before PR preview rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

in docs workflow, cache dependencies immediately after installing them

3 participants