Native GitHub Actions

Your Code & Docs.
In Perfect Sync.

The DocStar GitHub workflow automatically syncs markdown documentation from your repository's docs/ directory directly to your DocStar collection on every single push.

Three Steps to Automate

Integrate the DocStar sync into your repository in minutes.

1. Generate Workflow

Run the provided command in your project root to download the GitHub Action workflow file directly into your .github/workflows directory.

bash
# Create workflow directory mkdir -p .github/workflows # Download workflow yaml curl "https://api.docstar.io/p/generate-docstar-workflow/<collectionId>?branch=main" -o .github/workflows/docstar.yml # Download format specification curl "https://api.docstar.io/docstar.md" -o docstar.md

2. Configure Secrets

The workflow requires an API key to securely communicate with the DocStar backend. Go to Settings > Secrets and variables > Actions in your repo and add it.

Repository secrets
DOCSTAR_API_KEYAdded just now

3. Commit & Push

Commit the new workflow file. Once pushed, any subsequent changes to markdown files inside your docs/ directory will automatically trigger the GitHub Action.

bash
git add .github/workflows/docstar.yml git commit -m "Add DocStar sync workflow" git push origin main # 🚀 Automation takes over from here!

Synchronization Format

Docstar synchronizes via a GitHub Action that sends a JSON payload to our import endpoints. Here is how your repository must be structured.

1. Directory Structure

Folders represent categories. Files represent individual pages. If a folder contains a page.md, it acts as the parent content.

docs/
getting-started.md
api/
page.md
auth.md
users/
create.md

2. File Format & Frontmatter

Files must use the .md extension and include a YAML frontmatter section to dictate how the content is parsed.

getting-started.md
--- type: page title: Getting Started published: true --- # Welcome This is the content...
users/create.md
--- type: endpoint title: Create User --- post: /users summary: New user

Summary of Rules for AI

Do use page.md for folder-level content.

Do include YAML frontmatter in every file.

Do use type: endpoint for API documentation.

Do maintain a clean folder hierarchy.

Don't use characters other than a-z, 0-9, -, and _ in file/folder names.

Ready to Sync Your Repository?

Keep your codebase and documentation in perfect harmony. Set up the GitHub Action today and let automation do the heavy lifting.

No credit card required. Setup in minutes.