Add Connect deploy workflows with PR previews - #81
Conversation
|
Preview deployed to Connect ( Deployed from commit db46a57. |
|
Preview deployed to Connect ( Deployed from commit db46a57. |
Adds GitHub Actions workflows to deploy the app to Posit Connect (dev and staging) via posit-dev/connect-actions, with PR draft previews and preview cleanup on PR close. Connect server URLs are read from the CONNECT_SERVER_DEV / CONNECT_SERVER_STAGING repo secrets rather than hardcoded.
There was a problem hiding this comment.
Could we add this to Rbuildignore so that it doesn't ship with the package?
simonpcouch
left a comment
There was a problem hiding this comment.
Nice, let's do this! A couple things to address before merge:
- What happens if I make PR A, then PR B, then want to look at the preview for PR A? In other words, is the deployed preview per-branch or per-repo?
- When I click '"Back to active version"', am I actually seeing the most recent deployed preview or am I seeing some previous version of the content, pre-deploy-preview for the given PR?
- Could you add Sara, Garrick, and Carson as viewers of these pages as well?
Noting for them that, for now, there seems to be a Connect issue where, after clicking the link, you will see a page that says you don't have access to the listing. Click "Back to active version" and then you'll see the page.
It's per branch, so each PR get's their own unique build on Connect!
Technically, it's the most recent deployed version, but moving forward that will be whatever is on
Done! |
Deploy-time manifest.json is used by connect-actions, not by the R package build.
|
Cleaned up 3 preview bundle(s) on https://dogfood.team.pct.posit.it: 358249, 358545, 358565 |
|
Cleaned up 3 preview bundle(s) on https://connect.staging.pct.posit.it: 1640, 1649, 1654 |
Summary
.github/workflows/deploy.yml: sends the app to two Connect servers (dev and staging) using posit-dev/connect-actions. A push tomainsends the real, live version. A pull request sends a draft preview instead, and posts a comment with the preview link..github/workflows/cleanup-previews.yml: deletes the draft previews from both servers when a pull request closes.CONNECT_SERVER_DEV,CONNECT_SERVER_STAGING) instead of being written directly in the workflow file. This keeps them out of a plain GitHub search. It does not fully hide them, though: the deploy step still posts the real address in its pull request comment (see below).shinychatremote inDESCRIPTION: the R package actually lives in thepkg-rfolder of that repo. The old remote pointed at the wrong spot, so it quietly used the CRAN version (0.4.0) instead, which is missingchat_server.