rstudio / actions

GitHub Actions for use with RStudio software.
MIT License
7 stars 11 forks source link

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

Closed cderv closed 3 years ago

cderv commented 3 years ago

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:

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 commented 3 years ago

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 commented 3 years ago

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

cderv commented 3 years ago

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