generated from dfe-analytical-services/shiny-template
-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (51 loc) · 1.94 KB
/
deploy-shiny.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
52
53
54
55
56
# Trying marketplace deploy action:
# https://github.com/marketplace/actions/deploy-to-shinyapps-io
name: Deploy to shinyapps.io
on:
push:
branches:
- main
- development
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:
- uses: actions/checkout@v2
- name: Set env vars (dev)
if: endsWith(github.ref, '/development')
run: |
echo "SHINYAPP_NAME='local-skills-dashboard-preprod'" >> $GITHUB_ENV
- name: Set env vars (prod)
if: endsWith(github.ref, '/main')
run: |
echo "SHINYAPP_NAME='local-skills-dashboard'">> $GITHUB_ENV
- name: Install dependencies
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libgdal-dev libgeos-dev libproj-dev
pip install GDAL==3.6.2
which gdal-config
- name: Check system path
shell: Rscript {0}
run: |
cat(Sys.getenv('PATH'))
Sys.setenv(PATH=paste("/usr/bin/", Sys.getenv("PATH"), sep=";"))
cat(Sys.getenv('PATH'))
- name: Check system path 2
run: >
Rscript
-e "cat(Sys.getenv('PATH'))"
- name: deploy
uses: BDSI-Utwente/shinyapps-deploy-github-action@v1
with:
# account and application name (https://<accountName>.shinyapps.io/<appName>)
appName: ${{env.SHINYAPP_NAME}}
accountName: 'department-for-education'
# token and secret obtained from https://www.shinyapps.io/admin/#/tokens
accountToken: ${{ secrets.SHINYAPPS_TOKEN }}
accountSecret: ${{ secrets.SHINYAPPS_SECRET }}