From GitHub

Deploy From GitHub

To publish a document or deploy an application from GitHub for the first time, follow these steps:

  1. Log In to Connect Cloud. This redirects you to your home page.
  2. Click the Publish button in the upper right of the screen. If this is your first time publishing, you will be prompted to install our GitHub App.
  3. Select the framework you want to deploy.
  4. Select your Repository: Use the autocomplete functionality to choose which of your GitHub repositories you want to publish content from. You can also enter a link to any public GitHub repository. Please note that free users can publish by pulling code from existing public GitHub repositories. Paid users have the option to publish from private repositories.

Note: If you do not see a repository that you believe should be there, ensure that your GitHub App has granted access to it.

  1. Confirm the Branch.
  2. Select your Primary file: The entrypoint file for your application (e.g., app.py) or document (e.g., index.qmd).
  3. Choose if you want to automatically republish on push. This is set to on by default.
  4. Set Advanced settings, if applicable.
  5. Set Sharing access (Enhanced and Advanced plans only).

Python deployments require a requirements.txt dependency file to be included in the repository. R deployments require a manifest.json dependency file.

Troubleshooting

If your deployment fails, please check that you provided all the required inputs for the specific content type and understand the current set of Known Issues. You can also try our experimental Error Assist feature to get additional guidance from your log output.

If you remain unsure as to why your content failed to deploy, please submit feedback and provide a link to your GitHub repository (if public).

Advanced Settings

Python version

Select one of our supported Python versions.

Secret variables

You can store multiple secret variables for each piece of published content. Secret variables are encrypted and ideal for sensitive information. To add a new variable at the time of publish:

  1. Click + Add variable
  2. Enter a name for your secret variable
  3. Enter a value for your secret variable

Variables will be stored when you press Publish. These variables are encrypted and stored securely on Connect Cloud. They can be used during the deployment by a given application or document.

Calling variables in source

Imagine you want to deploy an application that uses the API from OpenAI. Your application would need to send an API Key to OpenAI and it is best practice not to store such credentials in your source code.

This is why storing encrypted secrets on Connect Cloud is helpful. For example:

  • name: OPENAI_API_KEY
  • value: sk-2O0XuO23VHIydJd1ul0LHeL6U7G41wk2F84rB7LdJ50sQ9TF

You can then reference the variable in your code.

import os
api_key = os.getenv('OPENAI_API_KEY') 

api_key <- Sys.getenv("OPENAI_API_KEY") 

Republishing

Manual Republish

You can manually republish your content at any time. To do so, click the Republish button available either on the content card on your home page or from the left-hand navigation bar on the Content Admin page. This action triggers a fresh deployment using your most recent source code.

Automatic Republish

When you initially publish content from a GitHub repository, automatic republishing is enabled by default. This means any time you push changes to the connected branch, Connect Cloud will detect the update and automatically redeploy your content.

To disable this feature:

  1. Go to your Content Settings page.
  2. Toggle off Automatically publish on push.

Note: Automatic publish on push only works with repositories you gave the Connect Cloud GitHub app access to.