Skip to content

Commit

Permalink
testing setting environment variable in github workflow directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad1991 committed Dec 18, 2024
1 parent 9f263a9 commit 8a8bf85
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
# Step 5: Export Shiny app as a static website
- name: Export Shiny app
run: |
Rscript -e 'shinylive::export("./app", "_site")'
Rscript -e ' Sys.setenv(RUN_MODE = "BROWSER"); shinylive::export("./app", "_site")'
# Step 6: Upload artifact for deployment
- name: Upload Pages artifact
Expand Down
1 change: 1 addition & 0 deletions app/MainApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ app <- function() {
})

output$conditional_data_ui <- renderUI({
showNotification(Sys.getenv("RUN_MODE"), duration = 0)
if (Sys.getenv("RUN_MODE") != "SERVER") {
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
Expand Down
1 change: 1 addition & 0 deletions bs/R/MainApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ app <- function() {
})

output$conditional_data_ui <- renderUI({
showNotification(Sys.getenv("RUN_MODE"), duration = 0)
if (Sys.getenv("RUN_MODE") != "SERVER") {
res <- conditionalPanel(
condition = "input.conditionedPanels == 'Data'",
Expand Down
2 changes: 2 additions & 0 deletions deploy_serverless_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ code <- code[2:(length(code) - 1)]
writeLines(code, con)
close(con)

stop()

# Build serverless app
# ========================================
destination_folder <- "/home/konrad/Documents/Biostats/serverless/"
Expand Down

0 comments on commit 8a8bf85

Please sign in to comment.