diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c593796..7f50ae8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,32 +10,24 @@ on: workflow_dispatch: jobs: - deploy: - name: Deploy to shinyapps - - # allow skipping deployment for commits containing '[automated]' or '[no-deploy]' in the commit message - if: "!contains(github.event.head_commit.message, '[automated]') && !contains(github.event.head_commit.message, '[no-deploy]')" + shiny-deploy: runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - # Step 1: Check out the code from the repository - - uses: actions/checkout@v2 - - - name: Install system dependencies (libcurl) - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libcurl4-openssl-dev + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 - - name: Set PKG_CONFIG_PATH - run: | - # Set PKG_CONFIG_PATH for libcurl to make sure pkg-config finds it - export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH - echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV # Persist this for the rest of the workflow - echo "PKG_CONFIG_PATH: $PKG_CONFIG_PATH" # Print the value for debugging - - uses: r-lib/actions/setup-r@v2 with: - r-version: '4.1.1' # The R version to download (if necessary) and use. + use-public-rspm: true + - uses: r-lib/actions/setup-renv@v2 + + - name: Install rsconnect + run: install.packages("rsconnect") + shell: Rscript {0} # Step 2: Install R packages - name: install everything and deploy