-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.33 KB
/
deploy_shiny.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
on:
push:
branches: [main, master]
paths-ignore: '**/README.md'
pull_request:
branches: [main, master]
paths-ignore: '**/README.md'
name: deploy-shiny
jobs:
deploy-shiny:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup system dependencies
run: |
packages=(
libcurl4-openssl-dev
libgdal-dev
libproj-dev
libudunits2-dev
)
sudo apt-get update
sudo apt-get install --yes "${packages[@]}"
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: renv
- name: Setup R dependencies
uses: r-lib/actions/setup-renv@v2
#- name: Lint R
#if: always()
#shell: Rscript {0}
#run: rhino::lint_r()
- name: Run R unit tests
if: always()
shell: Rscript {0}
run: rhino::test_r()
- name: Push to shinyapps.io
if: github.event_name == 'push'
run: |
install.packages("rsconnect"), repos="http://cran.us.r-project.org")
rsconnect::setAccountInfo(name="${{secrets.SHINY_ACC_NAME}}", token="${{secrets.TOKEN}}", secret="${{secrets.SECRET}}")
rsconnect::deployApp(appName = 'WSBEvolutionCalc')
shell: Rscript {0}