-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (42 loc) · 1.4 KB
/
deploy.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
44
45
46
47
48
49
50
51
name: Deploy to shinyapps.io
'on':
# run on any push
push:
branches:
- main
paths:
- 'R/**'
- 'data/**'
- '.pipelines/deploy.R'
- 'renv.lock'
# Allow to be called by other workflow
# workflow_call:
# run on request (via button in actions menu)
workflow_dispatch:
env:
SHINYAPPS_ACCOUNT: ${{ secrets.SHINYAPPS_ACCOUNT }}
# token and secret obtained from https://www.shinyapps.io/admin/#/tokens
SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }}
SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }}
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:
- name: Check-out repo
uses: actions/checkout@v4
- name: 'Install R'
uses: r-lib/actions/setup-r@v2
with:
r-version: renv
use-public-rspm: true
- name: Install system dependencies
run: sudo apt-get install --yes libgdal-dev libgeos-dev libproj-dev libudunits2-dev
- name: Setup {renv}
uses: r-lib/actions/setup-renv@v2
- name: Setup {pandoc}
uses: r-lib/actions/setup-pandoc@v2
- name: Deploy app
run: Rscript .pipelines/deploy.R