|
23 | 23 | - name: Install system dependencies for R packages |
24 | 24 | run: sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev |
25 | 25 |
|
| 26 | + - name: Build renv lockfile with correct CRAN mirror |
| 27 | + run: | |
| 28 | + Rscript -e " |
| 29 | + app_dir <- normalizePath('shiny_apps/gwat_portfolio') |
| 30 | + options(repos = c(CRAN = 'https://cloud.r-project.org')) |
| 31 | + install.packages('renv', repos = 'https://cloud.r-project.org') |
| 32 | + writeLines(c( |
| 33 | + 'Package: gwatrnaseq', |
| 34 | + 'Title: gWAT RNA-seq Explorer', |
| 35 | + 'Version: 1.0.0', |
| 36 | + 'Imports: shiny, plotly, dplyr, stringr' |
| 37 | + ), file.path(app_dir, 'DESCRIPTION')) |
| 38 | + renv::init(project = app_dir, bare = TRUE, restart = FALSE) |
| 39 | + renv::install(c('shiny', 'plotly', 'dplyr', 'stringr'), prompt = FALSE) |
| 40 | + renv::snapshot(project = app_dir, type = 'explicit', prompt = FALSE) |
| 41 | + " |
| 42 | +
|
26 | 43 | - name: Deploy to shinyapps.io |
27 | 44 | env: |
28 | 45 | SHINYAPPS_NAME: ${{ secrets.SHINYAPPS_NAME }} |
|
31 | 48 | run: | |
32 | 49 | Rscript -e " |
33 | 50 | options(repos = c(CRAN = 'https://cloud.r-project.org')) |
34 | | - install.packages(c('renv', 'rsconnect', 'shiny', 'plotly', 'dplyr', 'stringr'), |
35 | | - repos = 'https://cloud.r-project.org', Ncpus = 2) |
| 51 | + install.packages('rsconnect', repos = 'https://cloud.r-project.org') |
36 | 52 | rsconnect::setAccountInfo( |
37 | 53 | name = Sys.getenv('SHINYAPPS_NAME'), |
38 | 54 | token = Sys.getenv('SHINYAPPS_TOKEN'), |
|
0 commit comments