Last modified: August 22, 2025
This guide walks you through how to configure GitHub actions to automatically upload a HubSpot project to your HubSpot account, allowing you to create an automated CI/CD workflow.
Turn off the built-in GitHub integration
If you currently use the built-in GitHub integration for a project built on the previous version of the developer platform (2025.1
or 2023.2
), you’ll want to turn it off before migrating your project to new developer platform. To turn off the built-in integration:
- In your HubSpot account, click Development in the main navigation bar.
- In the left sidebar menu, click Projects.
- Click the name of the project that you’ll be migrating.
- Click the Settings tab.
- Under GitHub connection, click Unlink project from GitHub, then confirm that you’re unlinking in the dialog box.

Set up GitHub actions
Once you’re ready to go and you’ve turned off the built-in GitHub integration for your existing project (if applicable), you can configure your GitHub repository and set up a workflow file:- In your GitHub repository, create two new secrets for:
HUBSPOT_ACCOUNT_ID
: the ID of your HubSpot account.HUBSPOT_PERSONAL_ACCESS_KEY
: your personal access key.
- The recommended way to reference these secrets in your actions is to set them as environment variables at the workflow level:
Please note: the
DEFAULT_CLI_VERSION
will default to the latest version, but it’s recommended that you target a specific CLI version to prevent new releases from impacting your CI/CD flow.- In the working directory of your project repository, create a GitHub action workflow file at
.github/workflows/main.yml
. - Copy the following example workflow below in the
main.yml
file you just created. Note that you can replacemain
with your default branch name if it’s something other thanmain
.
- Commit and merge your changes.
Please note: do not change the
account_id
or personal_access_key
values in your workflow. Authentication-related values should only be stored as GitHub secrets.main
will trigger an upload to your target HubSpot account.
Learn more about the HubSpot project action on the GitHub marketplace.