Skip to content

Commit

Permalink
Add deploy gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
flor14 committed Nov 14, 2023
1 parent 583c776 commit e1359bc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 101 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]

name: shiny-deploy

jobs:
shiny-deploy:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-renv@v2

- name: Install rsconnect
run: install.packages("rsconnect")
shell: Rscript {0}

- name: Authorize and deploy app
env:
# Provide your app name, account name, and server to be deployed below
APPNAME: feederwatch_app
ACCOUNT: flor
SERVER: shinyapps.io # server to deploy
run: |
rsconnect::setAccountInfo("${{ secrets.RSCONNECT_USER }}", "${{ secrets.RSCONNECT_TOKEN }}", "${{ secrets.RSCONNECT_SECRET }}")
rsconnect::deployApp(appName = "${{ env.APPNAME }}", account = "${{ env.ACCOUNT }}", server = "${{ env.SERVER }}")
shell: Rscript {0}
101 changes: 0 additions & 101 deletions .github/workflows/run-tests.yaml

This file was deleted.

0 comments on commit e1359bc

Please sign in to comment.