Automatically upload a HubSpot Project to your account 🚀
In your GitHub repo, create two new secrets for:
HUBSPOT_ACCOUNT_ID
- This is your HubSpot account IDHUBSPOT_PERSONAL_ACCESS_KEY
- Your personal access key
This guide walks through setting up a new workflow file that automatically uploads new changes on your main
branch to your HubSpot account. If you're adding a deployment step to an existing workflow, you can skip ahead.
- In your project, create a GitHub Action workflow file at
.github/workflows/main.yml
- Copy the following example workflow into your
main.yml
file.
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: HubSpot Project Upload Action
uses: HubSpot/[email protected]
with:
account_id: ${{ secrets.hubspot_account_id }}
personal_access_key: ${{ secrets.hubspot_personal_access_key }}
- Commit and merge your changes
Note: Do not change the account_id
or personal_access_key
values in your workflow. Auth related values should only be stored as GitHub secrets.
HUBSPOT_ACCOUNT_ID
- Target account idHUBSPOT_PERSONAL_ACCESS_KEY
- Authentication key