Replace reference links that block automated HEAD requests #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to shinyapps.io | |
| on: | |
| push: | |
| branches: [ main ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Publish to shinyapps.io | |
| runs-on: ubuntu-latest | |
| env: | |
| R_CONFIG_ACTIVE: shinyapps | |
| SHINYAPPS_ACCOUNT: ${{ secrets.SHINYAPPS_ACCOUNT }} | |
| SHINYAPPS_TOKEN: ${{ secrets.SHINYAPPS_TOKEN }} | |
| SHINYAPPS_SECRET: ${{ secrets.SHINYAPPS_SECRET }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.5.0' | |
| - name: Cache R library | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ runner.os }}-R-${{ hashFiles('renv.lock', 'DESCRIPTION') }} | |
| restore-keys: | | |
| ${{ runner.os }}-R- | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::rsconnect, any::usethis, , any::desc, local::. | |
| - name: Update DESCRIPTION | |
| run: | | |
| usethis::use_package("pkgload") | |
| # Move cmdstanr from Suggests to Imports and add 'Remotes' field | |
| d <- desc::desc(file = "DESCRIPTION") | |
| d$del_dep("cmdstanr", type = "Suggests") | |
| d$set_dep("cmdstanr", type = "Imports") | |
| d$set_remotes(c(d$get_remotes(), "stan-dev/cmdstanr")) | |
| d$write(file = "DESCRIPTION") | |
| shell: Rscript {0} | |
| - name: Authenticate with shinyapps.io | |
| run: | | |
| rsconnect::setAccountInfo( | |
| name = Sys.getenv('SHINYAPPS_ACCOUNT'), | |
| token = Sys.getenv('SHINYAPPS_TOKEN'), | |
| secret = Sys.getenv('SHINYAPPS_SECRET') | |
| ) | |
| shell: Rscript {0} | |
| - name: Deploy app (ignore renv.lock) | |
| run: | | |
| options(rsconnect.packrat = TRUE) | |
| rsconnect::deployApp( | |
| appDir = '.', | |
| appName = 'shinymrp', | |
| server = 'shinyapps.io', | |
| forceUpdate = TRUE | |
| ) | |
| shell: Rscript {0} |