From dab86cc5b631ff1e27d61909df8dd686705316fe Mon Sep 17 00:00:00 2001 From: David Hugh-Jones Date: Mon, 13 May 2024 12:20:54 +0800 Subject: [PATCH] Add a github action step to publish uj-dashboard to shinyapps.io --- .github/workflows/quarto-publish.yml | 14 ++++++++++++++ shinyapp/dashboard/uj-dashboard.qmd | 6 ++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/quarto-publish.yml b/.github/workflows/quarto-publish.yml index b7eebaa..b0dfaab 100644 --- a/.github/workflows/quarto-publish.yml +++ b/.github/workflows/quarto-publish.yml @@ -55,3 +55,17 @@ jobs: target: gh-pages env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions + + - name: Publish dashboard to shinyapps.io + env: + RSCONNECT_USER: ${{ secrets.RSCONNECT_USER }} + RSCONNECT_TOKEN: ${{ secrets.RSCONNECT_TOKEN }} + RSCONNECT_SECRET: ${{ secrets.RSCONNECT_SECRET }} + run: | + rsconnect::setAccountInfo(name = Sys.getenv("RSCONNECT_USER"), + token = Sys.getenv("RSCONNECT_TOKEN"), + secret = Sys.getenv("RSCONNECT_SECRET")) + quarto::quarto_publish_app(input = "shinyapp/dashboard", + account = "unjournal", + server = "shinyapps.io") + shell: Rscript {0} diff --git a/shinyapp/dashboard/uj-dashboard.qmd b/shinyapp/dashboard/uj-dashboard.qmd index 365d68d..1099374 100644 --- a/shinyapp/dashboard/uj-dashboard.qmd +++ b/shinyapp/dashboard/uj-dashboard.qmd @@ -87,7 +87,8 @@ plotOutput("plot_ratings") Below we show the distribution of evaluators' answers to detailed, quantitative questions about different aspects of the research. For more information -on these questions, see [here](https://globalimpact.gitbook.io/the-unjournal-project-and-communication-space/policies-projects-evaluation-workflow/evaluation/guidelines-for-evaluators). +on these questions, see +[here](https://globalimpact.gitbook.io/the-unjournal-project-and-communication-space/policies-projects-evaluation-workflow/evaluation/guidelines-for-evaluators). ```{r} @@ -318,8 +319,5 @@ output$plot_questions <- renderPlot({ x = NULL, y = NULL ) - - - }) ```