Skip to content

GitHub Integration

Connect a GitHub repository to deploy your app when commits are pushed to the default branch, FastAPI Cloud downloads the commit, builds it in the cloud, deploys it, and reports progress back to GitHub.

  • A FastAPI Cloud account with access to the app’s team
  • A GitHub account

If your FastAPI app is in a subdirectory, set the Root Directory when creating the app from GitHub, or configure the Application Directory in app settings.

To create a new app from a repository:

  1. Open the FastAPI Cloud dashboard
  2. Go to your team
  3. Create a new app. GitHub Repository is selected by default
Create App page with GitHub Repository selected and the available repositories listed. Create App page with GitHub Repository selected and the available repositories listed.
  1. Connect your GitHub account if prompted
  2. Install or update the FastAPI Cloud GitHub App if prompted
  3. Select the GitHub account or organization. If it’s not listed, click Add GitHub Account
GitHub account selector with available organizations and the Add GitHub Account option. GitHub account selector with available organizations and the Add GitHub Account option.
  1. Select the repository

  2. Set the Root Directory if your app is not at the repository root

App configuration with the selected GitHub repository, app name, root directory, environment variables, and Create App button. App configuration with the selected GitHub repository, app name, root directory, environment variables, and Create App button.
  1. Click Create App

FastAPI Cloud creates the app with the repository connected. To start the first deployment, push to the default branch or click Deploy latest commit on the app’s Deployments page.

To connect GitHub to an existing app:

  1. Open the app in the FastAPI Cloud dashboard
  2. Go to Settings
  3. Find Repository in the Build & Deploy section
App settings with Repository and its Connect button in the Build & Deploy section. App settings with Repository and its Connect button in the Build & Deploy section.
  1. Click Connect
  2. Connect your GitHub account if prompted
  3. Install or update the FastAPI Cloud GitHub App if prompted
  4. Select the GitHub account or organization. If it’s not listed, click Add GitHub Account
  5. Select the repository
Repository picker in the Build & Deploy section of app settings with a Connect button for each repository. Repository picker in the Build & Deploy section of app settings with a Connect button for each repository.
  1. Click Connect

Connecting the repository does not start a deployment. Push to the default branch to deploy. For an app with no deployments yet, Deploy latest commit is also available on its Deployments page.

To stop GitHub-triggered deployments for an app, disconnect the repository from the same Repository settings in the Build & Deploy section. Existing deployments keep running.

FastAPI Cloud creates deployments from the connected repository when:

  • A commit is pushed to the connected repository’s default branch
  • You click Deploy latest commit on the Deployments page of an app with no deployments yet

The same GitHub repository can be connected to more than one FastAPI Cloud app. Each app can use build filters to choose which file changes trigger a build. Pushes that do not pass an app’s filters appear in its deployment history as Build Skipped.

Only pushes to the default branch trigger deployments. Pushes to other branches are ignored. Pull request preview deployments are not supported today.

Change repository access from GitHub by editing the FastAPI Cloud GitHub App installation.

To revoke access entirely, remove the FastAPI Cloud GitHub App installation in GitHub. To stop deployments for one FastAPI Cloud app, disconnect the repository from that app’s Repository settings in the Build & Deploy section.

Check that:

  • Your GitHub account is connected to FastAPI Cloud
  • The FastAPI Cloud GitHub App is installed on the repository owner
  • The GitHub App installation includes the repository
  • You selected the correct personal account or organization in the repository picker

Check that:

  • The push was to the repository’s default branch
  • The app is still connected to that repository
  • The same commit was not already deployed for the app
  • The changed files pass the app’s build filters; filtered pushes show as Build Skipped
  • The app’s Application Directory points to the directory containing your FastAPI project

Check the deployment in FastAPI Cloud first. If the deployment exists there but GitHub status is missing, confirm the GitHub App still has access to the repository.