Skip to content

Conversation

@VisruthSK
Copy link
Member

@VisruthSK VisruthSK commented Jun 13, 2025

  • Adopted new theme closer to main Stan webpage
  • GitHub Action builds and deploys site on releases
  • GHA also deploys latest version of site on pushes to master at mc-stan.org/loo/dev/*

@VisruthSK VisruthSK changed the title Reformat packagedown workflow Reformat pkgdown workflow Jun 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.76%. Comparing base (b4c12c3) to head (e840f59).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   92.76%   92.76%           
=======================================
  Files          31       31           
  Lines        2986     2986           
=======================================
  Hits         2770     2770           
  Misses        216      216           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VisruthSK
Copy link
Member Author

On second though, if possible, it might make more sense to automatically build and deploy sites to https://dev.mc-stan.org/loo/ and setup another workflow to generate the site on releases which would get pushed to https://mc-stan.org/loo/.

@VisruthSK
Copy link
Member Author

VisruthSK commented Jun 13, 2025

on:
pull_request:
should be removed once the workflow is confirmed to work.

Obviated

@jgabry
Copy link
Member

jgabry commented Jun 13, 2025

On second though, if possible, it might make more sense to automatically build and deploy sites to https://dev.mc-stan.org/loo/ and setup another workflow to generate the site on releases which would get pushed to https://mc-stan.org/loo/.

Yeah I agree that it would be preferable to only publish the site on https://mc-stan.org/loo/ when we do a release. If we publish at the main URL on every commit to master then the website could advertise unreleased features that aren't available on CRAN yet.

@jgabry
Copy link
Member

jgabry commented Jun 13, 2025

I think this looks good. But the regenerated website pages that are part of this PR are for the development version of loo, not the released version. So if I merge this won't it update the website to the development version?

@VisruthSK
Copy link
Member Author

Right, I'll move files from the gh-pages branch into the docs folder then

@VisruthSK
Copy link
Member Author

https://github.com/stan-dev/loo/actions/runs/15627201098/job/44023603976

Looks like the vignettes get built too.

@VisruthSK
Copy link
Member Author

Updated _pkgdown.yml to link to Aki's CV page. Closes #294

@VisruthSK VisruthSK requested a review from jgabry June 23, 2025 19:05
@VisruthSK
Copy link
Member Author

@jgabry this should build the site in the pages directory and doesn't add any website files to the main branch. I'm running the pkgdown action again but hopefully it passes and this can be merged.

@jgabry
Copy link
Member

jgabry commented Oct 16, 2025

Cool thanks, I think this looks great. I put two questions in review comments

@jgabry
Copy link
Member

jgabry commented Oct 16, 2025

I think this is ready to go except for updating the config after transferring the repo.

_pkgdown.yml Outdated
url: https://mc-stan.org/loo/
destination: "docs/"
template:
package: pkgdownConfig
Copy link
Member

Choose a reason for hiding this comment

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

Does this also need to be pkgdown-config now?

Copy link
Member Author

Choose a reason for hiding this comment

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

So the package itself has to be pkgdownConfig since that's the R package's name--but the repository now needs to be stan-dev/pkgdown-config

Copy link
Member Author

Choose a reason for hiding this comment

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

The builds are starting to fail now that its trying to point to the stan-dev/pkgdown-config repository somehow--there's some dependency issue. The cache might be stale and so needs to be refreshed?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it's passing now

Copy link
Member Author

Choose a reason for hiding this comment

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

The website still hasn't been rebuilt--the new "DEV" tag isn't visible. There seems to be some dependency issue but I don't understand why there should be any?

https://mc-stan.org/loo/dev/

@jgabry
Copy link
Member

jgabry commented Oct 17, 2025

Yeah I'm not sure why it's not updating.

Unrelated, but in the vignette do we also need to change pkgdownConfig to pkgdownconfig in this line:

https://github.com/stan-dev/pkgdown-config/blob/8e2486b796aa8ea8e8667822c93fac197ab4001f/vignettes/Setup.qmd#L23

@jgabry
Copy link
Member

jgabry commented Oct 17, 2025

Yeah so this is failing due to dependency issues but it doesn't make any sense to me https://github.com/stan-dev/loo/actions/runs/18600052282/job/53036048076

@jgabry
Copy link
Member

jgabry commented Oct 17, 2025

What about resetting the cache? Although it looks like you're not even using the cache action, it's commented out

@VisruthSK
Copy link
Member Author

VisruthSK commented Oct 17, 2025

I'm also baffled about the dependencies. I did delete the cache but only for this branch--I guess it could still be hitting the main branch's cache? I'm really confused about what it is complaining about and why it started now. You're right about the vignette as well that needs to be the package name.

Just double checked and it doesn't seem like there were any cache hits in the run logs

@jgabry
Copy link
Member

jgabry commented Oct 17, 2025

Long shot but there's usually an "Explain error" (or something like that) button that opens a chat with GitHub Co-pilot to try to help you troubleshoot the failure. I've tried it before in other repos and it usually wasn't helpful but one time it did actually help me sort out an error.

@VisruthSK
Copy link
Member Author

Yeah I had tried that and it said nothing useful. I'm looking further into this of course--hopefully it's just a simple mistake I made somewhere.

@VisruthSK
Copy link
Member Author

VisruthSK commented Oct 19, 2025

@jgabry Fixed it!

For posterity: removed the pkgdown-config repo from Config/needs/website and added it manually as a dependency in the GHA. Maybe hyphens somehow were the issue?

@VisruthSK VisruthSK requested a review from jgabry October 19, 2025 03:23
@jgabry
Copy link
Member

jgabry commented Oct 20, 2025

Awesome, thanks for tracking down the issue! One question: if for any of the other R packages we don't end up using GHA to generate the website then will how will it resolve the dependency issue of requiring the pkgdown config package from stan-dev/pkgdown-config? That is, suppose for rstanarm we decide we'll do it manually using pkgdown::build_site() and then push to gh-pages. In the yaml file there will be

template:
  package: pkgdownconfig

How will it know where to find this? Do that make sense? I might just be missing something obvious.

@VisruthSK
Copy link
Member Author

I included a little section here: https://mc-stan.org/pkgdown-config/articles/Setup.html

You don't have to use {pak} but I prefer it to {remotes} or such.

For local development, you need to install the package before you can build the site:

pak::pak("stan-dev/pkgdown-config")
pkgdown::build_site()

The workflow without the action would then be: checkout gh-pages branch, install pkgdownconfig, build the site, and push manually.

@jgabry
Copy link
Member

jgabry commented Oct 20, 2025

Ah ok, perfect, thanks.

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

Thanks for all your work on this @VisruthSK. Do you want to do the honors and merge it?

@VisruthSK VisruthSK merged commit 0ddc47b into master Oct 20, 2025
7 checks passed
@VisruthSK VisruthSK deleted the reformat-packagedown-workflow branch October 20, 2025 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants