Skip to content

Conversation

@magland
Copy link

@magland magland commented Oct 2, 2025

This PR introduces automatic deployment of these examples to GitHub Pages with interactive Stan Playground embeds. It adds a CI/CD pipeline, Jekyll configuration, and helper scripts to generate index.md files for browsing models interactively.

For a preview, I have deployed this on my fork here:
https://magland.github.io/example-models/

You can navigate the folders, and when there is a directory with .stan file(s), you will see those embedded in Stan Playground where you can edit/run the models. The system also looks for .data.json files adjacent to the .stan files and loads those into the SP window.

Changes:

  • GitHub Actions Workflow: Added .github/workflows/ghp-deploy.yml to build and deploy site via GitHub Pages. Workflow generates index files, builds Jekyll site, and deploys only on main/master pushes
  • Deployment Tools: New ghp-deployment/ directory with scripts to generate the index.md files embedding Stan Playground, etc.
  • Jekyll/GitHub Pages Setup: Added Gemfile and _config.yml, updated .gitignore to exclude _site and Gemfile.lock
  • Repository Documentation: Updated top-level README.md with link to the interactive browser
  • Minor adjustments: needed to fix some Jekyll Latex formatting issues in a couple .Rmd files.

IMPORTANT: If this PR were to be accepted, we would need to modify a couple hardcoded strings. For example https://magland.github.io would need to become https://stan-dev.github.io and PAGES_REPO_NWO: magland/example-models would need to become PAGES_REPO_NWO: stan-dev/example-models

In order for this to work, the pages configuration for this repo would need to be turned on and set to GitHub Actions in Settings.

Worked on this with @WardBrian

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.

1 participant