Appearance
Are you an LLM? You can read better optimized documentation at /docs/custom-widgets/v2/build-and-publish.md for this page in Markdown format
Build & Publish
Pushing code to your watched branch automatically updates your widgets, scripts, and stylesheets. This page explains the publishing flow and what triggers it.
Prerequisites
- A connected GitHub organization (see Connect Your GitHub Account)
- At least one enabled repository (see Repository & Branch Settings)
How It Works
When you push changes to a watched branch, your extension content is automatically fetched, processed, and published.
The Push-to-Publish Flow
1. Push to Watched Branch
When you push a commit to your repository's watched branch (e.g., main), the platform detects the change automatically.
2. Change Detection
The platform identifies:
- Which repository was updated
- Which branch received the push
- Whether this branch is being watched
3. Content Fetching
If the push was to a watched branch, the platform:
- Fetches the widget registry file from your repository
- Downloads widget directories defined in
sourceblocks - Downloads script and stylesheet files with relative paths
- Validates the content structure
4. Validation and Security Check
Valid content is:
- Scanned for security issues (see Content Security)
- Processed and optimized
- Validated against the schema
5. Publishing
Validated content is:
- Published to the platform
- Made available in the No-Code Builder and on community pages
Note: If content hasn't changed since the last publish, it will be skipped rather than re-uploaded. This is normal and improves performance. You'll see this reflected in the build status details.
6. Extensions Available
Your extensions are now:
- Serving new content
- Visible in the No-Code Builder's widget library
- Ready to be placed on pages by community administrators
The entire process from push to availability typically completes within seconds for simple extensions.
What Triggers Publishing
Extension publishing is automatically triggered by several actions:
| Action | What Happens |
|---|---|
| Push to watched branch | New content is fetched and published |
| Enable a repository | Current content is immediately published |
| Change watched branch | All extensions replaced with content from the new branch |
| Initial connection | Content is fetched when you first enable a repository |
You don't need to push a new commit after enabling a repository or changing branches — publishing happens automatically. Which branch is watched is configured in Repository & Branch Settings.
Branch-Based Content
You choose which branch each repository watches in Repository & Branch Settings. Each repository watches one branch at a time per community; changing it replaces all extensions from that repo. For multi-environment workflows, use separate communities — each watching its own branch.
Example workflow with separate communities:
- Dev Community watches
develop— develop extensions there - Merge to
stagingand push — Staging Community picks up changes automatically - QA team verifies in Staging Community
- Merge to
mainand push — Production Community picks up changes automatically
For a step-by-step guide, see Preview and Promote.
Build Status
Each publishing attempt shows a status (In Progress, Completed, Warning, Failed) in Sources. A Warning status means the build succeeded and your content is live, but advisories — such as deprecation notices — need your attention. Click the status indicator to see the full error details for failed builds or the advisory list for builds with warnings. For what each status means and how to act on it, see Repository & Branch Settings — Understanding Build Status.
Common Questions
"Why didn't my push update the extensions?"
Check these items:
- Did you push to the watched branch? Pushes to other branches don't trigger updates.
- Is the repository enabled? Disabled repos don't sync.
- Did the build complete successfully? Check build status for errors.
- Is your content correctly formatted? Validation errors prevent publishing.
"How long does publishing take?"
Typical publishing times:
- Simple widgets: A few seconds
- Complex extensions with many assets: Under a minute
- Large repositories: May take longer
If publishing seems stuck:
- Check if status shows "In Progress" for an extended time
- Talk to your Gainsight team if builds consistently hang
"My extensions show old content"
Possible causes:
- Content propagation: Updates may take a few minutes to propagate
- Browser caching: Try a hard refresh (Ctrl+Shift+R or Cmd+Shift+R)
- Wrong branch: Verify you pushed to the watched branch
- Build failed: Check that the last build completed successfully
"Can I publish from multiple branches simultaneously?"
See Repository & Branch Settings for how branch configuration works (one branch per repository per community, separate communities for multiple branches). For a step-by-step multi-environment workflow, see Preview and Promote.
"Why does the build show fewer extensions than I expected?"
If your build completed successfully but shows fewer published extensions than you expected, some may have been skipped. This happens when:
- The extension content hasn't changed since the last publish
- The extension uses an external URL endpoint (not hosted by the platform)
Skipped extensions are not an error — they simply didn't need updating.
Troubleshooting
Build stuck "In Progress"
- Wait a few minutes — large repos take longer
- If stuck for more than 10 minutes, talk to your Gainsight team
Build "Failed" with no clear error
- Check that your configuration files are valid (valid JSON)
- Ensure all referenced files exist in the repository
- Review the detailed error in build logs
Content not updating after successful build
- Clear your browser cache
- Wait a few minutes for content propagation
- Try accessing from a different browser or incognito mode
For more troubleshooting help, see Common Issues.
Next Steps
- Multiple Organizations — Work with multiple GitHub organizations
- Recipes: Preview and Promote — Preview builds before going to production
- Recipes: Force Republish — Trigger a rebuild without a code change
- Error Codes — Full error reference for build failures
- Troubleshooting — Resolve common issues

