Skip to content

Commit b694bc3

Browse files
committed
adjust how linux libraries are installed for github actions
1 parent d74f2cc commit b694bc3

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

β€Ž.github/workflows/publish.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,43 @@ on:
77

88
jobs:
99
build-deploy:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-latest # GitHub-hosted Ubuntu 24.04
1111
permissions:
1212
contents: write
1313

1414
steps:
15-
# 1 β€” check out the repo (unchanged, but updated to latest action revision)
15+
# 1 ──────────── Check out the repo
1616
- name: Check out repository
1717
uses: actions/checkout@v4
1818

19-
# 2 β€” install the requested version of R (version bumped to 4.5.0)
19+
# 2 ──────────── Install the matching version of R
2020
- name: Set up R
2121
uses: r-lib/actions/setup-r@v2
2222
with:
23-
r-version: '4.5.0'
24-
25-
# 3 β€” SAFER: install all Linux libs detected from renv.lock / DESCRIPTION
26-
- name: Install system dependencies
27-
uses: r-lib/actions/setup-system-dependencies@v2
28-
29-
# 4 β€” restore R packages via renv, using a fresh cache key
23+
r-version: '4.5.0' # ← matches your lock-file
24+
25+
# 3 ──────────── Install *system* libraries needed by curl, ragg, etc.
26+
- name: Install Linux libraries needed by R packages
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y \
30+
libcurl4-openssl-dev \
31+
libfontconfig1-dev \
32+
libfreetype6-dev \
33+
libx11-dev \
34+
pandoc
35+
36+
# 4 ──────────── Restore the renv library + cache
3037
- name: Install R dependencies via renv
3138
uses: r-lib/actions/setup-renv@v2
3239
with:
33-
cache-version: 2 # <-- bumped so the R-4.4 cache is not reused
40+
cache-version: 2 # bump => new cache under R-4.5
3441

35-
# 5 β€” install Quarto CLI (same as before)
42+
# 5 ──────────── Install Quarto CLI
3643
- name: Set up Quarto
3744
uses: quarto-dev/quarto-actions/setup@v2
3845

39-
# 6 β€” render the site and push to gh-pages (unchanged)
46+
# 6 ──────────── Render the site and push to gh-pages
4047
- name: Render and Publish
4148
uses: quarto-dev/quarto-actions/publish@v2
4249
with:

0 commit comments

Comments
Β (0)