-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (31 loc) · 1.03 KB
/
deploy_shinyapps.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
name: deploy-shinyapps
on:
push:
branches: main
paths-ignore:
- 'README.md'
workflow_dispatch:
jobs:
deploy-shiny:
if: github.repository_owner == 'r4ds'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.2'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rsconnect
cache-version: 1
- name: Set up .Renviron
run: |
echo "R4DS_CLUB_GOOGLE_SERVICE_ACCOUNT=${{secrets.R4DS_CLUB_GOOGLE_SERVICE_ACCOUNT}}" >> .Renviron
echo "shinyslack_key=${{secrets.SHINYSLACK_KEY}}" >> .Renviron
echo "SLACK_SKIPLOAD=TRUE" >> .Renviron
shell: bash {0}
- name: Push to shinyapps
run: |
rsconnect::setAccountInfo(name='r4dscommunity', token=${{secrets.SHINYAPPS_TOKEN}}, secret=${{secrets.SHINYAPPS_SECRET}})
rsconnect::deployApp(appName = 'bookclubber', forceUpdate = TRUE)
shell: Rscript {0}