feat(CI): add support for CI boilerplate in golem#1237
Open
ilyaZar wants to merge 1 commit intoThinkR-open:masterfrom
Open
feat(CI): add support for CI boilerplate in golem#1237ilyaZar wants to merge 1 commit intoThinkR-open:masterfrom
ilyaZar wants to merge 1 commit intoThinkR-open:masterfrom
Conversation
- two helpers for two workflows - template workflows
Member
|
@ilyaZar just for my personal information, where did you get the ci from? |
There was a problem hiding this comment.
Pull request overview
Adds first-party helpers to generate deployment CI boilerplate for {golem} apps, including bundled workflow templates, documentation, and tests.
Changes:
- Introduce
add_github_action()andadd_gitlab_ci()helpers to generate deployment CI files from templates. - Add GitHub Actions / GitLab CI template YAML files under
inst/utils/. - Add testthat coverage plus generated Rd docs; update example dev script, NEWS, NAMESPACE, and roxygen metadata.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
R/add_ci_files.R |
Implements the two new helpers and internal template/rendering utilities. |
inst/utils/github-action-template.yml |
Adds a GitHub Actions workflow template for rsconnect deployment. |
inst/utils/gitlab-ci-template.yml |
Adds a GitLab CI template for rsconnect deployment. |
tests/testthat/test-add_ci_files.R |
Adds tests verifying file creation and key template contents. |
man/add_github_action.Rd |
Generated documentation for add_github_action(). |
man/add_gitlab_ci.Rd |
Generated documentation for add_gitlab_ci(). |
inst/shinyexample/dev/02_dev.R |
Updates example guidance to prefer the new helpers. |
NAMESPACE |
Exports the new helper functions. |
NEWS.md |
Announces the new CI helpers. |
DESCRIPTION |
Updates RoxygenNote after regenerating docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+56
to
+61
| if (Sys.getenv("SERVER") == "") { | ||
| stop( | ||
| "Set SERVER in the workflow before deploying.", | ||
| call. = FALSE | ||
| ) | ||
| } |
|
|
||
| deploy-shiny: | ||
| stage: deploy | ||
| image: rocker/verse:latest |
| #' | ||
| #' @export | ||
| #' | ||
| #' @return The path to the created workflow, invisibly. |
Comment on lines
+265
to
+268
|
|
||
| path_dir <- function(path) { | ||
| dirname(path) | ||
| } |
Comment on lines
+64
to
+71
| - name: Authorize and deploy app | ||
| env: | ||
| APPNAME: __APPNAME__ | ||
| ACCOUNT: your-account-name | ||
| SERVER: shinyapps.io | ||
| run: | | ||
| rsconnect::setAccountInfo("${{ secrets.RSCONNECT_USER }}", "${{ secrets.RSCONNECT_TOKEN }}", "${{ secrets.RSCONNECT_SECRET }}") | ||
| rsconnect::deployApp(appDir = ".", appPrimaryDoc = "app.R", appName = Sys.getenv("APPNAME"), account = Sys.getenv("ACCOUNT"), server = Sys.getenv("SERVER")) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
two helpers for two workflows
template workflows
give me a bit to figure out if mergeable;