Projects

Connect GitHub

Connect your Spice.ai project to a GitHub repository

Prepare the repository

Before connecting:

  • Admin access: Ensure you have administrative access to the GitHub repository. This level of access is required to install the Spice.ai GitHub app.
  • Repository owner: The repository must belong to the GitHub organization or account that the Connect @<owner> button shows. This owner is usually the name of your Spice.ai org. The repository name can differ from the project name. For example, the project spice.ai/spiceai/demo can connect to github.com/spiceai/demo or to github.com/spiceai/platform.
  • spicepod.yaml: The repository needs a spicepod.yaml in the project's root directory. The root directory is the repository root unless you set another directory when you connect.

To quickly set up a new repository, use the spiceai/spice-app-template as a starting point.

Connect

  1. In the context of the Spice project to connect, navigate to Settings > GitHub, then find the Connect Git Repository section.
  2. Click Connect @<owner> and follow the GitHub App installation instructions.

Ensure that you select all repositories or specifically the repository you intend to connect.

  1. Link the repository:
    • If a repository with the same name as the project exists, click Link Repository.
    • To use a repository with another name, enter its name under Connect an existing repository, then click Connect repository.
    • If no repository exists yet, click Create <owner>/<project>. The owner is the one the Connect @<owner> button shows.
  2. Optional: in Root directory, enter the directory that contains the project, for example projects/demo. Use a path inside the repository, with no leading slash and no ... Leave it empty to use the repository root. The portal warns when it finds no spicepod.yaml in that directory.

Once connected, the section is titled Connected Git Repository and offers a Production Branch selector and a Disconnect button. To change the directory later, edit Root directory in the same settings page and save it.