From 5ad9709be6a28d05c2b173eaf71dbf2e31a9ad1c Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:27:06 +0100 Subject: [PATCH 1/2] Use build_site() directly since we want clean = FALSE to leverage pkgdown built-in caching --- .github/workflows/render-dashboard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/render-dashboard.yml b/.github/workflows/render-dashboard.yml index 0af8bae4c3..b1df6b9311 100644 --- a/.github/workflows/render-dashboard.yml +++ b/.github/workflows/render-dashboard.yml @@ -33,7 +33,7 @@ jobs: - uses: r-lib/actions/setup-renv@v2 - name: Build site - run: pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE) + run: pkgdown::build_site(new_process = FALSE, install = TRUE) shell: Rscript {0} - name: Upload artifact From da6c39011e4992c10c93e7135c3f9b29973e9b6b Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Sun, 5 May 2024 21:30:33 +0200 Subject: [PATCH 2/2] Download site artifact from previous run --- .github/workflows/render-dashboard.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/render-dashboard.yml b/.github/workflows/render-dashboard.yml index b1df6b9311..2e11887368 100644 --- a/.github/workflows/render-dashboard.yml +++ b/.github/workflows/render-dashboard.yml @@ -32,6 +32,14 @@ jobs: - uses: r-lib/actions/setup-renv@v2 + # Recover latest build so we can reuse cached files (e.g., LICENSE.html). + # The official action is only scoped for artifacts within the same + # workflow. + - uses: dawidd6/action-download-artifact@v3 + with: + name: github-pages + path: ./docs + - name: Build site run: pkgdown::build_site(new_process = FALSE, install = TRUE) shell: Rscript {0}