Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
novica authored Sep 25, 2024
1 parent 083d0eb commit face2e9
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Deploy a shiny app to Posit Connect
# Worflow derived from https://github.com/r-lib/actions/blob/v2/examples/shiny-deploy.yaml
# 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
# See also: https://solutions.posit.co/operations/deploy-methods/ci-cd/github-actions/

name: Update Requirements on Deploy Branch

on:
push:
branches:
- main # Trigger when pushing to main

jobs:
ci:
runs-on: ubuntu-latest

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 rsconnect
run: install.packages("rsconnect")
shell: Rscript {0}

- name: Generate rsconnect manifest.json
run: rsconnect::writeManifest()
shell: Rscript {0}

- name: Publish to Posit Connect
uses: rstudio/actions/connect-publish@main
with:
url: ${{ secrets.CONNECT_SERVER }}
api-key: ${{ secrets.CONNECT_API_KEY }}
access-type: all
dir: |
.:/listeriacalculator

0 comments on commit face2e9

Please sign in to comment.