1- on : [push, pull_request]
1+ on : [push, pull_request, workflow_dispatch ]
22
33name : build
44
@@ -20,22 +20,33 @@ jobs:
2020 - { os: macOS-latest, r: 'release' }
2121 - { os: windows-latest, r: 'release' }
2222 - { os: windows-latest, r: 'oldrel' }
23- - { os: ubuntu-20 .04, r: 'devel', http-user-agent: 'release' }
24- - { os: ubuntu-20 .04, r: 'release', release: true }
25- - { os: ubuntu-20 .04, r: 'oldrel-1' }
26- - { os: ubuntu-20 .04, r: 'oldrel-2' }
27- - { os: ubuntu-20 .04, r: 'oldrel-3' }
28- - { os: ubuntu-20 .04, r: 'oldrel-4' }
23+ - { os: ubuntu-22 .04, r: 'devel', http-user-agent: 'release' }
24+ - { os: ubuntu-22 .04, r: 'release', release: true }
25+ - { os: ubuntu-22 .04, r: 'oldrel-1' }
26+ - { os: ubuntu-22 .04, r: 'oldrel-2' }
27+ - { os: ubuntu-22 .04, r: 'oldrel-3' }
28+ - { os: ubuntu-22 .04, r: 'oldrel-4' }
2929
3030 env :
3131 GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
3232 R_KEEP_PKG_SOURCE : yes
3333
3434 steps :
35- - uses : actions/checkout@v3
35+ - uses : actions/checkout@v4
3636
3737 - uses : r-lib/actions/setup-pandoc@v2
3838
39+ - name : Configure pak and setup-r action to use manylinux_2_28
40+ if : startsWith(matrix.config.os, 'ubuntu') && matrix.config.r != 'devel'
41+ run : |
42+ # Override PPM repo and do not autodetect the distro (setup-r action env var)
43+ echo "RSPM=https://p3m.dev/cran/__linux__/manylinux_2_28/latest" >> $GITHUB_ENV
44+ # Configure pak to use the same PPM repo when checking for the latest packages
45+ echo "PKG_CRAN_MIRROR=${RSPM}" >> $GITHUB_ENV
46+ # Disable automatic system requirements installation since it is unnecessary (pak env var)
47+ # Temporarily reenabled to build terra from source
48+ # echo "PKG_SYSREQS=FALSE" >> $GITHUB_ENV
49+
3950 - uses : r-lib/actions/setup-r@v2
4051 with :
4152 r-version : ${{ matrix.config.r }}
@@ -44,10 +55,10 @@ jobs:
4455
4556 - uses : r-lib/actions/setup-r-dependencies@v2
4657 with :
47- # Temporarily install htmlwidgets >= 1.6.0 for tests
58+ # leaflet needs terra, which does not support R <= 4.0
4859 extra-packages : |
4960 any::rcmdcheck
50- htmlwidgets?source
61+ leaflet=?ignore-before-r=4.1.0
5162
5263 - uses : r-lib/actions/check-r-package@v2
5364
6071 if : matrix.config.release
6172 uses : r-lib/actions/setup-r-dependencies@v2
6273 with :
63- extra-packages : any::pkgdown, local::.
74+ extra-packages :
local::., [email protected] 6475
6576 - name : Build pkgdown site
6677 if : matrix.config.release
7990 echo "NETLIFY_ALIAS=${version_alias}-${github_sha_short}" >> $GITHUB_ENV
8091 fi
8192
93+ - name : Rebuild pkgdown site search index for GitHub Pages
94+ if : matrix.config.release && github.ref == 'refs/heads/main'
95+ run : Rscript pkgdown/build-search-gh.R
96+
97+ - name : Deploy pkgdown site to GitHub Pages
98+ if : matrix.config.release && github.ref == 'refs/heads/main'
99+ 100+ with :
101+ branch : gh-pages
102+ folder : docs
103+
82104 - name : Deploy pkgdown site to Netlify
83105 if : matrix.config.release
84- uses : nwtgck/actions-netlify@v1.2
106+ uses : nwtgck/actions-netlify@v3.0
85107 with :
86108 publish-dir : ' ./docs'
87109 github-token : ${{ secrets.GITHUB_TOKEN }}
@@ -92,26 +114,21 @@ jobs:
92114 env :
93115 NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
94116 NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
95- timeout-minutes : 1
96-
97- - name : Deploy pkgdown site to GitHub Pages
98- if : matrix.config.release && github.ref == 'refs/heads/main'
99- 100- with :
101- branch : gh-pages
102- folder : docs
117+ timeout-minutes : 5
118+ # Work around Netlify error of "Error: Unprocessable Entity" even though the deployment succeeds
119+ continue-on-error : true
103120
104121 build-node :
105122 runs-on : ubuntu-latest
106123
107124 name : Node.js
108125
109126 steps :
110- - uses : actions/checkout@v3
127+ - uses : actions/checkout@v4
111128
112- - uses : actions/setup-node@v3
129+ - uses : actions/setup-node@v4
113130 with :
114- node-version : ' 16 '
131+ node-version : ' 22 '
115132 cache : ' npm'
116133
117134 - name : Install dependencies
@@ -124,4 +141,4 @@ jobs:
124141 run : npm run lint
125142
126143 - name : Upload coverage to Codecov
127- uses : codecov/codecov-action@v3
144+ uses : codecov/codecov-action@v4
0 commit comments