Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added flag to enable forced update of existing apps #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

h-joshi
Copy link

@h-joshi h-joshi commented Feb 16, 2024

Added a flag that enables forced update for already installed apps. Without this flag, the deployment fails if an app with the same name already exists.

@andrewbowen19
Copy link

Wanted to give a +1 to this PR! Love the action, though I'm running into a deployment error with an app of the same name when using it!

@h-joshi
Copy link
Author

h-joshi commented Jul 1, 2024

Wanted to give a +1 to this PR! Love the action, though I'm running into a deployment error with an app of the same name when using it!

Could you paste a screenshot of the error or any logs? I've been using this in my CI/CD pipeline without issues. Happy to update the PR if there's something amiss.

@andrewbowen19
Copy link

Hi there @h-joshi , posting some logs from a failed action I tried to run on my branch:

- Installing feasts ...                         OK [installed binary and cached in 1.2s]
- Installing shinyjs ...                        OK [installed binary and cached in 0.45s]
- Installing colourpicker ...                   OK [installed binary and cached in 0.68s]
- Installing ggExtra ...                        OK [installed binary and cached in 0.66s]
- Installing gridExtra ...                      OK [installed binary and cached in 0.61s]
- Installing urca ...                           OK [installed binary and cached in 0.52s]
checking account info... [OK]
── Preparing for deployment ────────────────────────────────────────────────────
Error in `rsconnect::deployApp()`:
! Discovered a previously deployed app named "REMSDashboard"
(View it at <https://scmn6p-andrew-bowen.shinyapps.io/REMSDashboard/>)
ℹ Set `forceUpdate = TRUE` to update it.
ℹ Supply a unique `appName` to deploy a new application.
Backtrace:
    ▆
 1. └─rsconnect::deployApp(...)
 2.   └─rsconnect:::findDeploymentTarget(...)
 3.     └─rsconnect:::findDeploymentTargetByAppName(...)
 4.       └─rsconnect:::shouldUpdateApp(...)
 5.         └─rsconnect:::cli_menu(...)
 6.           └─cli::cli_abort(c(header, not_interactive), .envir = .envir, call = error_call)
 7.             └─rlang::abort(...)
Execution halted

@h-joshi
Copy link
Author

h-joshi commented Jul 3, 2024

Hi @andrewbowen19

This PR hasn't been integrated into this repository yet.

As a result I've had to fork this to https://github.com/kidsneuro-lab/shinyapps-deploy-github-action/tree/forceupdate-flag-added . At present, I'm using this action kidsneuro-lab/shinyapps-deploy-github-action@forceupdate-flag-added currently which has the forceUpdate flag implemented.

Before

        uses: BDSI-Utwente/shinyapps-deploy-github-action@v1
        with:
          # account and application name (https://<accountName>.shinyapps.io/<appName>)
          appName: REMSDashboard
          accountName: scmn6p-andrew-bowen

          # token and secret obtained from https://www.shinyapps.io/admin/#/tokens
          accountToken: ${{ secrets.SHINYAPPS_TOKEN }}
          accountSecret: ${{ secrets.SHINYAPPS_SECRET }}

After

        uses: kidsneuro-lab/shinyapps-deploy-github-action@forceupdate-flag-added
        with:
          # account and application name (https://<accountName>.shinyapps.io/<appName>)
          appName: REMSDashboard
          accountName: scmn6p-andrew-bowen

          # token and secret obtained from https://www.shinyapps.io/admin/#/tokens
          accountToken: ${{ secrets.SHINYAPPS_TOKEN }}
          accountSecret: ${{ secrets.SHINYAPPS_SECRET }}

          # force update if app with same name is already deployed
          forceUpdate: true

bluegenes added a commit to bluegenes/shinyapps-deploy-github-action that referenced this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants