Skip to content
Permalink
main
Switch branches/tags
View runs Go to file
 
 
Cannot retrieve contributors at this time
on:
push:
branches:
- main
- master
name: deploy-to-connect
jobs:
deploy-to-connect:
runs-on: macOS-latest
env:
APP_NAME: "GitHub_Actions_Deployment"
APP_DIR: "app"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RSCONNECT_URL: ${{ secrets.RSCONNECT_URL }}
RSCONNECT_APIKEY: ${{ secrets.RSCONNECT_APIKEY }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
- name: Install renv
run: |
install.packages("renv")
shell: Rscript {0}
- name: Restore environment
run: |
renv::consent(TRUE)
renv::restore()
shell: Rscript {0}
- name: Install shinytest dependencies
run: |
shinytest::installDependencies()
shell: Rscript {0}
- name: Run shinytest tests
run: |
shinytest::testApp("${{ env.APP_DIR }}")
shell: Rscript {0}
- name: Generate manifest.json
run: |
rsconnect::writeManifest(appDir = "${{ env.APP_DIR }}")
shell: Rscript {0}
- name: Deploy to RStudio Connect
uses: rstudio/actions/connect-publish@main
with:
url: https://${{ env.RSCONNECT_APIKEY }}@${{ env.RSCONNECT_URL }}
access-type: logged_in
show-logs: true
force: true
dir: ${{ env.APP_DIR }}
require-vanity-path: true