相关疑难解决方法(0)

如何在 .Renviron 文件的 GitHub Actions 工作流程中引用 GitHub Secrets

您好,我即将完成使用 GitHub 操作添加 CI/CD 步骤来部署我拥有的 R Shiny 应用程序。我遇到的问题是 R 中有一个名为的文件.Renviron,我用它来存储在 R 脚本中访问我的 SQL 数据库的凭据。通常,我在本地部署应用程序,并且在使用 rsconnect 包时包含此文件,但现在我使用 GitHub 操作,我相信我必须在 bash 脚本步骤中自己手动创建此 .Renviron 文件。

下面是我的 github 工作流程代码现在的样子。我遇到的问题是零件Create and populate .Renviron file

# Triggered on push and pull request events
on: [push, pull_request]

# Name of the workflow => usethis::use_github_actions_badge("CI-CD")
name: CI-CD

jobs:
  CI-CD:
    runs-on: ${{ matrix.config.os }}

    name: ${{ matrix.config.os }} (${{ matrix.config.r }})

    strategy:
      # we keep a matrix for convenience, but we would typically just run …
Run Code Online (Sandbox Code Playgroud)

continuous-integration r continuous-deployment github-actions

6
推荐指数
1
解决办法
2744
查看次数