-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 1.1 KB
/
main.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
name: Deploy to shinyapps.io
on:
# run on any push
push:
# run on request (via button in actions menu)
workflow_dispatch:
jobs:
deploy:
name: Deploy to shinyapps
# allow skipping deployment for commits containing '[automated]' or '[no-deploy]' in the commit message
if: "!contains(github.event.head_commit.message, '[automated]') && !contains(github.event.head_commit.message, '[no-deploy]')"
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code from the repository
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2-branch
# Step 2: Install R packages
- name: install everything and deploy
env:
RS_TOKEN: ${{ secrets.TOKEN }}
RS_SECRET: ${{ secrets.SECRET }}
run: |
install.packages(c('renv','shiny', 'rsconnect'))
renv::restore()
rsconnect::setAccountInfo(name='easyeyes', token=Sys.getenv('RS_TOKEN'), secret=Sys.getenv('RS_SECRET'))
rsconnect::deployApp(appName = 'easyeyes_app', forceUpdate = TRUE)
shell: Rscript {0}