Update construction and insolvency data #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |