-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.69 KB
/
shinyapps_io.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: deploy shinyapps.io
on:
push:
tags:
- 'shiny*'
jobs:
shinyapps:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
RENV_PATHS_ROOT: ~/.local/share/renv
SHINY_ACCOUNT: ${{ secrets.SHINY_ACCOUNT }}
SHINY_TOKEN: ${{ secrets.SHINY_TOKEN }}
SHINY_SECRET: ${{ secrets.SHINY_SECRET }}
steps:
# Check out code
- name: Checkout
uses: actions/checkout@v3
- name: R setup
uses: r-lib/actions/setup-r@v2
with:
# don't reinstall R
install-r: false
# use RStudio's CRAN mirror with precompiled binaries
use-public-rspm: true
- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get install -y libssl-dev
sudo apt-get install -y libgsl-dev
sudo apt-get install -y libclang-dev
- name: Cache packages
uses: actions/cache@v3
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
- name: Deploy to shinyapps.io
run: |
install.packages("rsconnect")
rsconnect::setAccountInfo(name="${{secrets.SHINY_ACC_NAME}}", token="${{secrets.TOKEN}}", secret="${{secrets.SECRET}}")
rsconnect::deployApp(appName = 'viroprofiler-viewer')
shell: Rscript {0}