Skip to content

udpate main.yml

udpate main.yml #4

Workflow file for this run

name: Deploy to shinyapps.io
on:
# run on any push
push:
# run on request (via button in actions menu)
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:
# Step 1: Check out the code from the repository
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2-branch
# Step 2: Install R packages
- name: install everything and deploy
env:
RS_TOKEN: ${{ secrets.TOKEN }}
RS_SECRET: ${{ secrets.SECRET }}
run: |
install.packages(c('renv','shiny', 'rsconnect'))
renv::restore()
rsconnect::setAccountInfo(name='easyeyes', token=Sys.getenv('RS_TOKEN'), secret=Sys.getenv('RS_SECRET'))
rsconnect::deployApp(appName = 'easyeyes_app')
shell: Rscript {0}