GitHub Markdown Sync for Confluence
Keep docs in GitHub. Read them in Confluence.
Overview
Developers write documentation in Markdown, stored in GitHub alongside their code. But PMs, stakeholders, and non-technical teams live in Confluence. GitHub Markdown Sync bridges this gap with automatic one-way sync: push to GitHub, pages update in Confluence.
How It Works
- Connect — Add your GitHub repo via a personal access token
- Map — Choose which folder to sync and which Confluence space to sync into
- Sync — Pages are created and updated automatically
Features
- Automatic sync on push — GitHub webhook triggers updates within seconds
- Scheduled sync fallback — Hourly background sync catches anything webhooks miss
- Smart change detection — Only pages with actual changes are updated
- Frontmatter support — YAML frontmatter controls page titles and labels
- Folder-to-space mapping — Map a GitHub directory to a Confluence space
- Works with private repos — GitHub PAT stored securely in Forge Storage
- Runs on Forge — 100% serverless on Atlassian's infrastructure
Configuration
Setting Up a Connection
- Install the app from the Atlassian Marketplace
- Go to the app settings in your Confluence space
- Add a GitHub connection:
- Personal Access Token — a GitHub PAT with repo read access
- Repository — owner/repo format
- Branch — the branch to sync from (e.g.,
main) - Source path — the folder in the repo containing Markdown files
- Target space — the Confluence space to publish to
Frontmatter
Control page metadata with YAML frontmatter at the top of your Markdown files:
---
title: My Page Title
labels:
- documentation
- api
---
# Page content starts here...
Webhook Setup (Optional)
For instant sync on push, add a webhook to your GitHub repo:
- Go to your repo Settings > Webhooks
- Add the webhook URL provided in the app settings
- Select "push" events
Markdown Conversion
| Markdown | Confluence |
|---|---|
Headings (# ## ###) | Heading styles |
| Code blocks | Code macro with syntax highlighting |
| Tables | Confluence tables |
| Images | Inline images (resolved from repo) |
| Links | Confluence links |
| Bold, italic, lists | Native formatting |
Frequently Asked Questions
Is this one-way or two-way sync?
One-way only: GitHub → Confluence. Changes made in Confluence are overwritten on the next sync. If you need to edit content, edit the Markdown file in GitHub and let the sync push the update.
Does it support GitHub Enterprise?
The app connects to GitHub via personal access tokens and the GitHub REST API. It works with github.com (public and private repos). GitHub Enterprise Server support depends on whether the Forge runtime can reach your Enterprise instance's API — contact us if you need this.
What happens to pages if I disconnect a repo?
Existing Confluence pages remain in place — they're not deleted when you remove a connection. They simply stop receiving updates. You can continue editing them manually in Confluence.
Can I sync multiple folders to different spaces?
Yes. You can create multiple connections, each mapping a different GitHub folder to a different Confluence space. This is useful when you have separate documentation for different teams or products.
How does it handle images in Markdown?
Images referenced in Markdown files are resolved from the GitHub repo and embedded in the Confluence page. Relative image paths (e.g., ./images/diagram.png) are resolved relative to the Markdown file's location in the repo.
Does it preserve Confluence page hierarchy?
The app creates pages in a flat structure within the target space. If your GitHub folder has subdirectories, each Markdown file still becomes a top-level page. Page ordering follows the order defined in the sidebar configuration or alphabetical order by filename.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Pages not updating after push | Webhook may not be configured or is failing | Check GitHub repo Settings > Webhooks for delivery errors. Fall back to hourly scheduled sync. |
| Page content looks wrong | Unsupported Markdown syntax | The app supports CommonMark. GitHub-flavored extensions (e.g., task lists, alerts) may not render correctly. |
| "Token expired" error | GitHub PAT has expired | Generate a new personal access token in GitHub and update it in the app settings |
| Images not showing | Image path is incorrect or repo is private | Ensure image paths are relative to the Markdown file. For private repos, the PAT must have repo scope (not just public_repo). |
| Sync creates duplicate pages | File was renamed in GitHub | The app tracks files by path. Renaming a file creates a new page. Delete the old Confluence page manually. |
Data Security & Privacy
| Data storage | No data stored outside Atlassian |
| Data processing | No data processed outside Atlassian (except GitHub API for fetching Markdown) |
| Data residency | Exclusively within Atlassian apps and services |
| GDPR | Data processor — Confluence page content, GitHub repository content (Markdown files) |
| Security contact | support@alpinate.com |