From d093993616a79b32d4a28302a1a06d521f3cef8a Mon Sep 17 00:00:00 2001 From: Maria Doyle Date: Mon, 23 Sep 2024 22:07:27 +0100 Subject: [PATCH] fix action --- .github/workflows/quarto-publish.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/quarto-publish.yml b/.github/workflows/quarto-publish.yml index 9ca83d8..54dc59a 100644 --- a/.github/workflows/quarto-publish.yml +++ b/.github/workflows/quarto-publish.yml @@ -26,6 +26,11 @@ jobs: sudo apt-get update sudo apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev + # Add R dependencies + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + # Install R dependencies - name: Install R dependencies run: Rscript -e 'install.packages(c("evaluate", "rmarkdown", "knitr", "readr", "tidyr", "reactable", "maps", "plotly", "ggplot2", "tidygeocoder", "countrycode"))' @@ -53,7 +58,21 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev + + # Set up caching for R packages + - name: Cache R packages + uses: actions/cache@v3 + with: + path: ~/.R + key: ${{ env.cache-version }}-${{ runner.os }}-R + restore-keys: | + ${{ env.cache-version }}-${{ runner.os }}-R- + # Add R dependencies + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + # Install R dependencies - name: Install R dependencies run: Rscript -e 'install.packages(c("evaluate", "rmarkdown", "knitr", "readr", "tidyr", "reactable", "maps", "plotly", "ggplot2", "tidygeocoder", "countrycode"))'