The Neon GitHub integration
Connect your GitHub application repository to your Neon project
The Neon GitHub integration connects your GitHub application repository to your Neon project, making it easier to set up developer workflows using Neon's GitHub Actions or other CI/CD tools.
Feature Coming Soon
The Neon GitHub integration is currently in private preview. To start using it, request access by contacting our Customer Success team and asking to join the private preview.
When you connect your GitHub application repository to your Neon project, the integration performs the following actions:
- Creates a GitHub variable containing your Neon project ID.
- Generates a new Neon API key for your Neon account.
- Creates a GitHub secret containing the Neon API key.
info
Neon's GitHub Actions require setting a NEON_PROJECT_ID
variable and a NEON_API_KEY
secret in GitHub. The Neon GitHub app does this for you automatically.
The following section describes how to install the GitHub integration.
Prerequisites
This installation described below assumes the following:
- You already have a Neon account and project. If not, see Sign up for a Neon account.
- You have a GitHub account and a repository that you want to connect to your Neon project.
Install the GitHub integration
note
If you previously installed the integration for a different Neon project, remove the previous integration before installing. For instructions, see Remove the GitHub integration.
To add the GitHub integration to your Neon project:
- In the Neon Console, navigate to the Integrations page for your project.
- Locate the GitHub integration card and click Add.
- On the GitHub integration drawer, click Install GitHub app.
- On the Install & Authorize page, select whether to install and authorize the GitHub app for All repositories or Only select repositories.
- Selecting All repositories directs you back to the GitHub integration drawer in the Neon Console to select a GitHub repository.
- Selecting Only select repositories lets you choose a repository immediately.
- Since Neon's GitHub app is currently designed to work with a single repository, select Only select repositories and choose a GitHub repository from the Select repositories drop-down list.
- Click Install & Authorize to complete the installation.
You are directed back to the GitHub integration drawer in the Neon Console.
Changes made by the integration
This section describes where to find the changes made by the Neon GitHub integration to your GitHub and Neon accounts.
-
Installed and Authorized GitHub Apps
To view the installed and authorized Neon GitHub application:
- Navigate to your GitHub account page.
- From your GitHub profile menu, select Settings.
- Select Applications from the sidebar.
The Neon GitHub app should be listed on the Installed GitHub Apps and Authorized GitHub Apps tabs.
-
Neon project ID variable and Neon API key secret
To view the variable containing your Neon project ID:
- Navigate to your GitHub account page.
- From your GitHub profile menu, select Your repositories.
- Select the repository that you chose when installing the Neon GitHub integration.
- On the repository page, select the Settings tab.
- Select Secrets and variables > Actions from the sidebar.
Your
NEON_API_KEY
secret is listed on the Secrets tab, and theNEON_PROJECT_ID
variable is listed on the Variables tab. -
Neon API key
To view the Neon API key created by the integration:
- In the Neon Console, click your profile at the top right corner of the page.
- Select Account settings.
- Select API keys.
The API key created by the integration should be listed with a name similar to the following: API key for GitHub (cool-darkness-12345678). You cannot view the key itself, only the name it was given, the time it was created, and when the key was last used.
note
The items listed above are removed if you uninstall the Neon GitHub integration. See Remove the GitHub integration.
Using the GitHub integration
The GitHub integration is intended to simplify setting up developer workflows using Neon's GitHub Actions or other CI/CD tools. Neon's GitHub Actions require the configuration steps performed by the Neon GitHub integration to be performed manually, namely:
- Creating a GitHub variable containing your Neon project ID.
- Generating a new Neon API key for your Neon account.
- Creating a GitHub secret containing the Neon API key.
After installing the Neon GitHub integration, you can proceed with setting up your GitHub Action workflow knowing that these steps are already completed.
For example applications that use Neon's GitHub Actions, see Example applications.
note
This is an early preview of the Neon GitHub integration. Its functionality is currently limited to configuring a project ID variable and Neon API Key secret. You may find that you need to configure additional variables and secrets when building workflows. When you run into a limitation, please let us know and we'll consider it for the next release. See Feedback and future improvements.
For more GitHub Action and workflow-related resources, please see:
- A database for every preview environment using Neon, GitHub Actions, and Vercel
- Database Branching Workflows
- Database branching workflow guide for developers.
Remove the GitHub integration
Removing the integration performs the following actions:
- Terminates connections dependent on the configured variable and secret.
- Removes the GitHub variable containing your Neon project ID.
- Removes the Neon API key for your Neon account.
- Removes the GitHub secret containing the Neon API key.
To remove the integration:
- In the Neon Console, navigate to the Integrations page for your project.
- Locate the GitHub integration and click Manage to open the GitHub integration drawer.
- Click Disconnect.
- Click Remove integration to confirm your choice.
Feedback and future improvements
If you've got feature requests or feedback about what you'd like to see from the Neon GitHub integration, let us know via the Feedback form in the Neon Console or our feedback channel on Discord.
Last updated on