-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (33 loc) · 1.09 KB
/
deployShinyApps.yaml
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
on:
push:
branches:
- main
name: shinyapps.io deploy
jobs:
deployShiny:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: 4.4.1
- name: Install git2r dependencies
run: sudo apt-get install -y libgit2-dev
- name: Install git2r
shell: Rscript {0}
run: |
install.packages("git2r")
- uses: r-lib/actions/setup-renv@v2
- name: Install rsconnect
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::install("[email protected]")
- name: Push to shinyApps.io
run: >
Rscript
-e "rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}')"
-e "rsconnect::deployApp(forceUpdate=TRUE)"