Skip to content

Commit

Permalink
Move run_example to own directory (#120)
Browse files Browse the repository at this point in the history
* move example app to own directory

* fix separate app tests

* update deploy script to point at new app directory

* update run_example docs

* add project id as now seems to be the default

* specific package for footer function in example app
  • Loading branch information
cjrace authored Jan 2, 2025
1 parent 3b0291e commit 99b0875
Show file tree
Hide file tree
Showing 11 changed files with 531 additions and 517 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- main
- master

name: Showcase app deploy
name: Example app deploy

jobs:
deployShiny:
Expand All @@ -27,8 +27,6 @@ jobs:
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::install("shinyjs")
devtools::install()
devtools::load_all()
renv::install("rsconnect")
rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}')
shiny_app <- run_example()
rsconnect::deployApp(shiny_app, forceUpdate = TRUE)
rsconnect::deployApp(system.file(package = "shinyGovstyle", "example_app"), forceUpdate = TRUE)
508 changes: 6 additions & 502 deletions R/run_example.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This package is also released with a [Contributor Code of Conduct](.github/CODE_

### Available components

The package contains an example dashboard you can run yourself, showcasing available components
The package contains an example app you can run yourself, showcasing available components. The code for the example app is in the `inst/example_app/` folder. Though you can easily run the app from the console using:

```r
shinyGovstyle::run_example()
Expand Down
2 changes: 2 additions & 0 deletions inst/example_app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# {shinytest2}: Ignore new debug snapshots for `$expect_values()`
*_.new.png
Loading

0 comments on commit 99b0875

Please sign in to comment.