Skip to content
Merged
Show file tree
Hide file tree
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
20 changes: 18 additions & 2 deletions .github/workflows/pkgdown.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why didn't the pkgdown workflow run on the last commit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The pkgdown workflow didn't run because of the branch targeting:

The workflow is configured to only run on pull requests targeting the main branch (line 10 of pkgdown.yaml: branches: - main).

Based on the PR description ("this PR merges into #163") and the commit history (grafted from test-mcp branch), this PR is targeting another branch (likely test-mcp or a branch related to PR #163), not main.

The workflow WOULD have triggered since .github/workflows/pkgdown.yaml was modified (which matches the paths filter on lines 16-23), but the branch target condition prevents it from running.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# more info: https://github.com/rstudio/education-workflows/tree/main/examples#deploy-pkgdown-to-github-pages-with-pr-previews-and-tagged-versions
on:
pull_request:
branches:
- main
types:
- opened
- reopened
Expand Down Expand Up @@ -67,6 +65,11 @@ jobs:
with:
tinytex: true

- name: Install JAGS
run: |
sudo apt-get update
sudo apt-get install -y jags

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
Expand All @@ -79,6 +82,19 @@ jobs:
extra-packages: |
local::.
r-lib/pkgdown

- name: Install rjags
run: |
install.packages("rjags",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is rjags not already installed by the setup-r-dependencies step?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, rjags is not automatically installed by setup-r-dependencies for several reasons:

  1. rjags is in Suggests, not Imports (line 49 of DESCRIPTION), so it's not a hard dependency
  2. needs: connect, website doesn't include all Suggests packages - it installs Imports and VignetteBuilder dependencies
  3. rjags requires special installation from source (type = "source") to properly link against the JAGS system library

This is why all other workflows (R-CMD-check.yaml line 69-80, test-coverage.yaml line 35-46) also have an explicit "install rjags" step after setup-r-dependencies.

The explicit installation is necessary because:

  • vignettes/dobson.Rmd uses library(rjags)
  • rjags must be compiled against the JAGS system library installed in the previous step
  • setup-r-dependencies would skip it or install a pre-built binary that won't work without JAGS

repos = "https://cloud.r-project.org",
type = "source",
verbose = TRUE)
withr::local_options(warn = 2)
library(rjags)
library(runjags)
runjags::findJAGS()
runjags::testjags()
shell: Rscript {0}

# If events is a PR, set subdir to 'preview/pr<pr_number>'
- name: "[PR] Set documentation subdirectory"
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Install JAGS (Windows)
if: runner.os == 'Windows'
run: |
curl.exe -o wjags.exe -L0 -k --url https://downloads.sourceforge.net/project/mcmc-jags/JAGS/4.x/Windows/JAGS-4.3.1.exe
wjags.exe /S
del wjags.exe
shell: cmd

# from https://github.com/ku-awdc/runjags/issues/2:
- name: Install JAGS (macOS)
if: runner.os == 'macOS'
run: |
sudo curl --location https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/JAGS-4.3.1.pkg -o /usr/local/JAGS-4.3.1.pkg
sudo installer -pkg /usr/local/JAGS-4.3.1.pkg -target /usr/local/bin/

- name: Install JAGS (Ubuntu)
if: runner.os == 'Linux'
- name: Install JAGS
run: |
sudo apt-get update
sudo apt-get install -y jags
Expand Down
Loading