Skip to content

Commit 9680478

Browse files
updated publish.yml to match Gulf ESR changes
Updated R version to 4.4.3 and added system dependencies for 'magick'. Modified installation of R dependencies to bypass rate limits for public GitHub packages.
1 parent ce6ad3b commit 9680478

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,43 @@ jobs:
1414
- name: Check out repository
1515
uses: actions/checkout@v4
1616

17+
# --- MODIFICATION 1: Update R Version ---
18+
- name: Install R
19+
uses: r-lib/actions/setup-r@v2
20+
with:
21+
r-version: '4.4.3' # CHANGED to match new renv.lock file
22+
1723
- name: Set up Quarto
1824
uses: quarto-dev/quarto-actions/setup@v2
1925
with:
2026
tinytex: true
2127

22-
- name: Install R
23-
uses: r-lib/actions/setup-r@v2
24-
with:
25-
r-version: '4.2.0'
28+
# --- MODIFICATION 2: Install System Dependencies (Fixes 'magick') ---
29+
# 'magick' requires the libmagick++-dev system library on Linux.
30+
- name: Install System Dependencies for R
31+
if: runner.os == 'Linux'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y libmagick++-dev
2635
27-
- name: Install R Dependencies
28-
uses: r-lib/actions/setup-renv@v2
29-
with:
30-
cache-version: 1
36+
# --- MODIFICATION 3: Install R Dependencies (Fixes IEAnalyzeR rate limit) ---
37+
# Inject GITHUB_TOKEN here to bypass rate limits for public GitHub packages (IEAnalyzeR)
38+
- name: Install R Dependencies (Forced Order)
39+
run: |
40+
# Use Rscript -e for single-line commands; the `if` is unnecessary here
41+
# since `setup-renv` ensures it's available.
42+
43+
# 1. Install critical dependencies using Rscript -e
44+
Rscript -e 'install.packages(c("here", "remotes"))'
45+
46+
# 2. Run renv::restore()
47+
Rscript -e 'renv::restore()'
48+
env:
49+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3150

3251
- name: Render and Publish
3352
uses: quarto-dev/quarto-actions/publish@v2
3453
with:
3554
target: gh-pages
3655
env:
3756
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-

0 commit comments

Comments
 (0)