Sync with GitHub
Sync your documentation with a GitHub repository. Push published content as Markdown files, pull changes made in GitHub back into Topicary, and optionally enable auto-sync to keep both sides in sync continuously.
Before you begin
This feature requires the Enterprise capability tier (the Business ). During the beta, every project is on the free Solo tier, so this feature is locked by default: go to Settings ▸ Billing and request Enterprise access to unlock it.
You need a GitHub repository where the documentation will be synced.
You need a GitHub personal access token with
reposcope (or a fine-grained token scoped to the target repository).You need at least one publication target configured in your map.
Configure GitHub sync
Go to Settings in the sidebar.
Open the Connections tab and find the Docs sync section.
Enter the repository in
owner/repoformat: for example,acme/docs.Enter the branch name: for example,
mainordocs.Enter a path prefix: for example,
docs/to place files in a subdirectory.Add a GitHub personal access token with
reposcope.Select the publication target whose content should be synced.
Store your GitHub personal access token securely. Use a fine-grained personal access token scoped to only the target repository when possible. The token is encrypted at rest using AES-256-GCM.
Test the connection
Click Test Connection to verify that Topicary can access the repository with the provided token.
Push to GitHub
Open the Sync panel in the right sidebar of the topic editor, or go to Settings > Connections > Docs sync.
Click Push.
Topicary resolves the content through the publishing pipeline, converts topics to Markdown, and commits them to the repository.
The last sync status shows the timestamp, commit SHA, and number of files written.
What gets pushed
One Markdown file for each topic in the map
Files placed under the configured path prefix
Folder hierarchy matching the map structure
Content resolved through the full publishing pipeline (components expanded, conditions filtered, variables substituted)
Pull from GitHub
Pull changes made directly in the GitHub repository back into Topicary:
Open the Sync panel or go to Settings > Connections > Docs sync.
Click Pull.
Topicary fetches the remote tree, compares content hashes, and imports changes.
New files become new topics (matched by title). Modified files update the corresponding topic's content. Deleted files are flagged but not automatically removed from Topicary.
Pull converts Markdown back to TipTap JSON for the editor. Complex Markdown features that do not have a TipTap equivalent may be simplified during conversion.
Auto-sync
Enable auto-sync to keep your repository and Topicary in sync automatically:
Open the Sync panel.
Toggle Auto-sync on.
When auto-sync is enabled:
Pushes happen automatically after each publish.
Pulls happen when GitHub sends a webhook notification (see below).
GitHub webhook for auto-pull
To receive automatic pull notifications, configure a GitHub webhook:
In your GitHub repository, go to Settings > Webhooks.
Add a webhook with the payload URL:
https://topicary.com/api/v1/webhooks/githubSet the content type to
application/json.Add a secret (the same value configured in your Topicary Docs sync settings).
Select the push event.
Topicary verifies the webhook signature using HMAC-SHA256 (timing-safe comparison) and triggers a pull when changes are detected on the configured branch.
The webhook handler includes sync loop prevention: pushes originating from Topicary do not trigger a pull, avoiding infinite loops.
Conflict resolution
If the same topic was modified in both Topicary and GitHub since the last sync, a pull triggers the conflict resolution dialog:
Option | Behavior |
|---|---|
Keep yours | Discards the GitHub version and keeps the Topicary content |
Use remote | Overwrites the Topicary content with the GitHub version |
Auto-merge | Attempts a three-way merge of both versions |
The dialog shows a side-by-side diff with color-coded changes (local versus remote) so you can compare before choosing.
Merging uses a three-way comparison (base, source, target) to combine changes. If both branches modify the same block, you will need to resolve the conflict manually using the side-by-side conflict resolution view. Always review the merge preview before confirming.
Sync history
The Sync panel shows a log of recent sync events:
Direction: push or pull
Timestamp: when the sync occurred
Files changed: number of files added, modified, or removed
Status: success or error (with details)
See also
Publish a web site: publish as a hosted documentation site instead of syncing to GitHub
Export content: download Markdown files directly instead of syncing
The publishing pipeline: how content is resolved before being pushed as Markdown
Security and data handling: how GitHub sync tokens are encrypted
Configure webhooks: Topicary webhooks (separate from GitHub webhooks)