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

[FR] Allow to publish with GHA on an existing content already deployed #11

Closed
cderv opened this issue Dec 11, 2020 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@cderv
Copy link

cderv commented Dec 11, 2020

It would be interesting to be able to have a way to publish to an existing content.

With rsconnect, there is several solution for that:

  • Most of the time, i'll use the appId because you can easily find it (in the url of the content).
  • deployApp also allow to pass the appName which is unique - but unless you remember what you set or you consult with rsconnect::deployments to find it again. I am not sure you can find it easily in your app webpage.

The API offer another way using the GUID (which you can easily find in the INFO part of your app page).

I think I would like to do something like this (example using a bookdown project, deploying static bookdown result here in book folder already containing a manifest)

      - name: Publish the book
        uses: rstudio/actions/connect-publish@main
        with:
          api-key: ${{ secrets.RSC_BETA_TOKEN }}
          url: https://beta.rstudioconnect.com/
          access-type: logged_in
          dir: _book
          content-id: 14655

or

      - name: Publish the book
        uses: rstudio/actions/connect-publish@main
        with:
          api-key: ${{ secrets.RSC_BETA_TOKEN }}
          url: https://beta.rstudioconnect.com/
          access-type: logged_in
          dir: _book
          content-guid: 1d9c4665-eae0-4b3c-ab75-5652653ecb2f

It would also be the app name which is unique on connect

      - name: Publish the book
        uses: rstudio/actions/connect-publish@main
        with:
          api-key: ${{ secrets.RSC_BETA_TOKEN }}
          url: https://beta.rstudioconnect.com/
          access-type: logged_in
          dir: _book
          name: demo-bookdown-deploy

This is a broader topic, but being able to set most of what rsconnect::deployApp could do would be great. But that is Bonus.

Currently, without this feature describe above, I can't really switch from a Manual Deployment workflow for a GHA deployment workflow without removing my previous content and re-publishing

See examples workflows I am testing in https://github.com/cderv/deploy-bookdown-demo/tree/master/.github/workflows. I can do it with

@meatballhat
Copy link
Contributor

This should now be possible for the cases where you want to specify an app GUID or name, e.g.:

      - name: Publish the book
        uses: rstudio/actions/connect-publish@main
        with:
          api-key: ${{ secrets.RSC_BETA_TOKEN }}
          url: https://beta.rstudioconnect.com/
          access-type: logged_in
          dir: _book:1d9c4665-eae0-4b3c-ab75-5652653ecb2f
      - name: Publish the book
        uses: rstudio/actions/connect-publish@main
        with:
          api-key: ${{ secrets.RSC_BETA_TOKEN }}
          url: https://beta.rstudioconnect.com/
          access-type: logged_in
          dir: _book:demo-bookdown-deploy

@meatballhat
Copy link
Contributor

Please reopen if you the above examples don't work correctly 😁

@cderv
Copy link
Author

cderv commented Dec 13, 2020

This is working partially:

The app is correctly deploy (as in I can access it on the server), but the action still show failure : https://github.com/cderv/deploy-bookdown-demo/runs/1545562709?check_suite_focus=true#step:9:44

I see that:

not sure what the error is - But I can confirm the app can be access on beta.rstudioconnect.com here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants