Skip to content
This repository has been archived by the owner on Oct 29, 2020. It is now read-only.

Commit

Permalink
deploy to shinyapps as hotfix for #24 also #7 closes #19
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheld83 committed Sep 15, 2020
1 parent 224d771 commit f1fc36b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Dockerfile
^\.github$
.vscode
oauni_10_18.code-workspace
^app\.R$
14 changes: 12 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,20 @@ jobs:
uses: azure/[email protected]
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy Shiny Application to shinyapps.io ref
env:
SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }}
SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }}
GITHUB_REF: ${{ github.ref }}
if: github.event_name != 'pull_request'
run: |
remotes::install_github(repo = "subugoe/hoad", ref = "master", force = TRUE, dependencies = TRUE)
rsconnect::setAccountInfo(name = 'subugoe', token = Sys.getenv('SHINYAPPS_TOKEN'), secret = Sys.getenv('SHINYAPPS_SECRET'))
app_name <- paste0("oadash-", gsub("/", "-", Sys.getenv('GITHUB_REF')))
rsconnect::deployApp(appName = app_name)
shell: Rscript {0}
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: maxheld83/ghpages@github-token
env:
BUILD_DIR: docs
- name: Sleep to let GITHUB_TOKEN persist
run: Sys.sleep(240)
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
data-raw/pubs_cat.csv
docs/
.rstudio/
rsconnect/
1 change: 1 addition & 0 deletions R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ app_ui <- function(request) {
golem_add_external_resources(),
# List the first level UI elements here
dashboardPage(
skin = "black",
dashboardHeader(title = "Open Access in Germany 2010-18",
titleWidth = 270),
dashboardSidebar(sidebarMenu(
Expand Down
2 changes: 1 addition & 1 deletion vignettes/interactive.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ title: "Interactive Dashboard"
---

```{r echo=FALSE}
shinycaas::include_app2("https://oadash.azurewebsites.net")
shinycaas::include_app2("https://subugoe.shinyapps.io/oauni_10_18/")
```

0 comments on commit f1fc36b

Please sign in to comment.