From face2e9b6e2aa75daf9c1fd9d75e3fb1bb6653b4 Mon Sep 17 00:00:00 2001 From: novica Date: Wed, 25 Sep 2024 14:18:15 +0200 Subject: [PATCH 1/2] Create deploy.yml --- .github/workflows/deploy.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8eeef91 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 From 9a44e812224c682dff7bb8bd626639e1d39ec5aa Mon Sep 17 00:00:00 2001 From: novica Date: Wed, 25 Sep 2024 14:26:52 +0200 Subject: [PATCH 2/2] Update deploy.yml --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8eeef91..062c5e4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,9 @@ jobs: runs-on: ubuntu-latest steps: + - name: Install ubuntu deps + run: sudo apt-get install -y --no-install-recommends libcurl4-openssl-dev + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2