Skip to content

feat(CI): add support for CI boilerplate in golem#1237

Open
ilyaZar wants to merge 1 commit intoThinkR-open:masterfrom
ilyaZar:fix-1115
Open

feat(CI): add support for CI boilerplate in golem#1237
ilyaZar wants to merge 1 commit intoThinkR-open:masterfrom
ilyaZar:fix-1115

Conversation

@ilyaZar
Copy link
Copy Markdown
Contributor

@ilyaZar ilyaZar commented Apr 16, 2026

  • two helpers for two workflows

  • template workflows

give me a bit to figure out if mergeable;

- two helpers for two workflows

- template workflows
@ColinFay
Copy link
Copy Markdown
Member

@ilyaZar just for my personal information, where did you get the ci from?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and add_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
Comment thread R/add_ci_files.R
#'
#' @export
#'
#' @return The path to the created workflow, invisibly.
Comment thread R/add_ci_files.R
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"))
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.

3 participants