Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 19 additions & 32 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,43 @@ on:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a specific Ubuntu version (ubuntu-22.04) instead of ubuntu-latest reduces automatic updates and may require manual maintenance when the version reaches end-of-life. Consider using ubuntu-latest unless there's a specific compatibility requirement.

Suggested change
runs-on: ubuntu-22.04
runs-on: ubuntu-latest

Copilot uses AI. Check for mistakes.
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest
RSPM: https://packagemanager.posit.co/cran/__linux__/jammy/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
id: install-r

- uses: r-lib/actions/setup-pandoc@v1

- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}
- uses: r-lib/actions/setup-pandoc@v2

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: |
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
key: ubuntu-latest-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-latest-${{ steps.install-r.outputs.installed-r-version }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("pkgdown", execute = TRUE)
shell: Rscript {0}

- name: Install dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE, dependencies = c("all", "Config/Needs/website"))
pak::pkg_install("pkgdown")
shell: Rscript {0}
extra-packages: any::pkgdown, local::.
needs: website

- name: Install package
run: R CMD INSTALL .

- name: Build and deploy pkgdown site
- name: Build pkgdown site
if: github.event_name == 'pull_request'
run: |
Rscript -e 'pkgdown::build_site()'

- name: Deploy pkgdown site
if: github.event_name == 'push'
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Expand Down