Skip to content

Data update 18 10 24 (#32) #16

Data update 18 10 24 (#32)

Data update 18 10 24 (#32) #16

Workflow file for this run

on:
push:
branches:
- main
name: Shinyapps.io deploy
jobs:
deployShiny:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Set env vars (prod)
run: |
echo "SHINYAPP_NAME='local-authority-interactive-tool'">> $GITHUB_ENV
- name: Restore renv snapshot
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
- name: Install rsconnect
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::install("rsconnect")
# Tokens are stored as secrets in GitHub to make sure only DfE analysts can publish apps in our shiny.io area
# Navigate to Settings > Secrets to add and view secrets. These can also be things like admin login and passwords for SQL databases.
# Get in touch with the Explore education statistics platforms team if you need to add the below secrets to publish to shinyapps.io
- name: Push to shiny.io
run: >
Rscript
-e "rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}')"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_NAME}}, forceUpdate = TRUE)"