From 675e4cd0f6a088a045def29f6be736edcf932016 Mon Sep 17 00:00:00 2001 From: GuidoMaggio Date: Tue, 7 May 2024 14:10:37 +0200 Subject: [PATCH] Test deployment --- .github/workflows/ci-cd.yml | 2 +- .rscignore | 1 + deploy/deploy-shinyapps.R | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .rscignore diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f16ec2e0..c857dea2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -86,7 +86,7 @@ jobs: git push origin - name: Deploy to shinyapps.io # Continuous deployment only for pushes to the main / master branch - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + # if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' env: SHINYAPPS_ACCOUNT: ${{ secrets.SHINYAPPS_ACCOUNT }} SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} diff --git a/.rscignore b/.rscignore new file mode 100644 index 00000000..f3c59a5c --- /dev/null +++ b/.rscignore @@ -0,0 +1 @@ +renv.lock diff --git a/deploy/deploy-shinyapps.R b/deploy/deploy-shinyapps.R index ce52b97d..c59a0832 100644 --- a/deploy/deploy-shinyapps.R +++ b/deploy/deploy-shinyapps.R @@ -6,12 +6,18 @@ rsconnect::setAccountInfo( Sys.getenv("SHINYAPPS_SECRET") ) -# to be added since rsconnect >1 -options(rsconnect.packrat = FALSE) +# Add here any additional files/directories the app needs +app_files = c( + "app.R", + "DESCRIPTION", + "NAMESPACE", + "R/", + "inst/" +) rsconnect::deployApp( account = "miraisolutions", - appName = "covid19", + appName = "covid19-test", forceUpdate = TRUE # to be added since rsconnect >1 # exclude hidden files and renv directory (if present) # appFiles = setdiff(list.files(), "renv")