Skip to content

Workflow file for this run

name: Deploy to shinyapps.io
on:
push:
branches:
- CI-deployment # Adjust this as needed for your workflow
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Generate matrix from deployments.json
id: set-matrix
run: |
MATRIX_JSON=$(cat deployments.json)
echo "::set-output name=matrix::$MATRIX_JSON"
deploy:
needs: prepare-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9.13"
- name: Install rsconnect-python
run: pip install rsconnect-python
- name: Configure rsconnect-python
env:
TOKEN: ${{ secrets.SHINYAPPS_TOKEN }}
SECRET: ${{ secrets.SHINYAPPS_SECRET }}
run: rsconnect add --account gallery --name gallery --token $TOKEN --secret $SECRET
- name: Deploy app to shinyapps
run: |
rsconnect deploy shiny ${{ matrix.app-dir }}
--name gallery
--title template-${{ matrix.app-dir }}
--entrypoint app-core.py
-a ${{ matrix.guid }}