Skip to content

Merge branch 'main' of github.com:jimbrig/jimsghstars #55

Merge branch 'main' of github.com:jimbrig/jimsghstars

Merge branch 'main' of github.com:jimbrig/jimsghstars #55

Workflow file for this run

# 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]
workflow_dispatch:
name: shiny-deploy
jobs:
shiny-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
SHINY_ACCOUNT: ${{ secrets.SHINY_ACCOUNT }}
SHINY_TOKEN: ${{ secrets.SHINY_TOKEN }}
SHINY_SECRET: ${{ secrets.SHINY_SECRET }}
WORK_DIR: ${{ github.workspace }}
steps:
- uses: actions/checkout@v4
- 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 Package Dependencies
run: |
install.packages(c("rsconnect", "automagic"))
setwd(Sys.getenv("WORK_DIR"))
automagic::install_deps_file()
shell: Rscript {0}
- name: Retrieve GitHub Stars Data
run: |
source("get_github_stars.R")
shell: Rscript {0}
- name: Commit and Push Changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Authorize and deploy app
run: |
rsconnect::setAccountInfo(name = Sys.getenv("SHINY_ACCOUNT"), token = Sys.getenv("SHINY_TOKEN"), secret = Sys.getenv("SHINY_SECRET"))
rsconnect::deployApp("app")
shell: Rscript {0}