Skip to content

Commit bc87367

Browse files
authored
Merge pull request #206 from stan-dev/new-pkgdown-theme
Added pkgdown workflow
2 parents e0e8fe8 + ab97627 commit bc87367

File tree

9 files changed

+241
-165
lines changed

9 files changed

+241
-165
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ LICENSE
1010
man-roxygen/*
1111
images/*
1212
^\.github$
13+
^pkgdown$

.github/workflows/pkgdown.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
# build dev site on merged pushes
5+
push:
6+
branches: [main, master]
7+
# build full site on releases
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown.yaml
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
cancel-in-progress: true
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
- uses: r-lib/actions/setup-r-dependencies@v2
35+
with:
36+
extra-packages: any::pkgdown, local::., any::withr, stan-dev/pkgdown-config, stan-dev/cmdstanr
37+
38+
- name: Build site
39+
run: |
40+
withr::with_envvar(
41+
c("NOT_CRAN" = "true"), # this should already be set by setup-r@v2? keeping because vignettes don't build otherwise
42+
pkgdown::build_site_github_pages(
43+
lazy = FALSE, # change to TRUE if runner times out.
44+
run_dont_run = FALSE, # shinystan is interactive so hangs
45+
examples = FALSE,
46+
new_process = TRUE
47+
)
48+
)
49+
shell: Rscript {0}
50+
51+
- name: Deploy to GitHub pages 🚀
52+
uses: JamesIves/github-pages-deploy-action@v4
53+
with:
54+
clean: false
55+
branch: gh-pages
56+
folder: docs

R/shinystan-package.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
# You should have received a copy of the GNU General Public License along with
1111
# this program; if not, see <http://www.gnu.org/licenses/>.
1212

13-
1413
#' \pkg{shinystan} R package ('ShinyStan' graphical user interface)
1514
#'
1615
#' @docType package
1716
#' @name shinystan-package
1817
#'
1918
#' @description
2019
#' \if{html}{
21-
#' \figure{stanlogo.png}{options: width="50" alt="mc-stan.org"}
20+
#' \figure{logo.svg}{options: width="50" alt="mc-stan.org"}
2221
#' \emph{Stan Development Team}
2322
#' }
2423
#'
@@ -54,7 +53,7 @@
5453
#' publication.
5554
#'
5655
#' The \code{\link{deploy_shinystan}} function lets you easily deploy your own
57-
#' ShinyStan apps online for any of your models using the shinyapps.io
56+
#' ShinyStan apps online for any of your models using the shinyapps.io
5857
#' service from 'RStudio'. Each of your apps (each of your models) will have a
5958
#' unique url and will be compatible with most web browsers.
6059
#'
@@ -79,7 +78,7 @@
7978
#' @template seealso-as.shinystan
8079
#' @template seealso-demo
8180
#' @template seealso-launch
82-
#'
81+
#'
8382
#' @template reference-muth
8483
#' @template reference-bayesvis
8584
#'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ShinyStan <img src="man/figures/stanlogo.png" align="right" width="120" />
1+
# ShinyStan <img src="man/figures/logo.svg" align="right" width="120" />
22

33
<!-- badges: start -->
44
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/shinystan?color=blue)](http://cran.r-project.org/web/packages/shinystan)
@@ -46,7 +46,7 @@ launch_shinystan_demo()
4646

4747
### Screenshots
4848

49-
<img src=https://github.com/stan-dev/shinystan/blob/master/images/home.png width=19% /><img src=https://github.com/stan-dev/shinystan/blob/master/images/explore.png width=24.5% /><img src=https://github.com/stan-dev/shinystan/blob/master/images/diagnose.png width=24.5% />
49+
<img src=https://github.com/stan-dev/shinystan/raw/master/images/home.png width=19% /><img src=https://github.com/stan-dev/shinystan/raw/master/images/explore.png width=24.5% /><img src=https://github.com/stan-dev/shinystan/raw/master/images/diagnose.png width=24.5% />
5050

5151
### About ShinyStan
5252

_pkgdown.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
url: https://mc-stan.org/shinystan
2+
3+
destination: "."
4+
5+
development:
6+
mode: auto
7+
8+
template:
9+
package: pkgdownconfig
10+
11+
navbar:
12+
title: "shinystan"
13+
14+
structure:
15+
left: [home, vignettes, functions, news, pkgs, stan]
16+
right: [search, bluesky, forum, github, lightswitch]
17+
18+
components:
19+
pkgs:
20+
text: Other Packages
21+
menu:
22+
- text: bayesplot
23+
href: https://mc-stan.org/bayesplot
24+
- text: cmdstanr
25+
href: https://mc-stan.org/cmdstanr
26+
- text: "loo"
27+
href: https://mc-stan.org/loo
28+
- text: posterior
29+
href: https://mc-stan.org/posterior
30+
- text: projpred
31+
href: https://mc-stan.org/projpred
32+
- text: rstan
33+
href: https://mc-stan.org/rstan
34+
- text: rstanarm
35+
href: https://mc-stan.org/rstanarm
36+
- text: rstantools
37+
href: https://mc-stan.org/rstantools
38+
39+
articles:
40+
- title: "Getting Started"
41+
desc: >
42+
The best way to get started is to play around with the demo by running
43+
launch_shinystan_demo(). The document below provides additional
44+
information about some of the R functions in the package.
45+
contents:
46+
- shinystan-package
47+
- title: "Hosting your App"
48+
desc: >
49+
The document below explains one way to host a shinystan app online.
50+
contents:
51+
- deploy_shinystan
52+
53+
reference:
54+
- title: "Package overview"
55+
desc: >
56+
Details about the shinystan R package.
57+
contents:
58+
- shinystan-package
59+
- title: "Launching the app"
60+
desc: >
61+
Functions for launching the app using a particular model or launching a demo of the app.
62+
contents:
63+
- launch_shinystan
64+
- launch_shinystan_demo
65+
- title: "shinystan objects"
66+
desc: >
67+
Functions for creating, examining, and modifying shinystan objects.
68+
contents:
69+
- as.shinystan
70+
- shinystan-class
71+
- shinystan-metadata
72+
- retrieve
73+
- drop_parameters
74+
- update_sso
75+
- generate_quantity
76+
- title: "Deploying apps"
77+
desc: >
78+
Functions for deploying shinystan apps on shinyapps.io.
79+
contents:
80+
- deploy_shinystan

0 commit comments

Comments
 (0)