DocsbookDocsbook
← Back to catalog
publishing

docs-publish

Publishes a local documentation folder to a new GitHub repository. Handles git init, commit, gh repo create, and push. Works without Docsbook MCP. Use after /docs-from-site, /docs-from-code, or /docs-from-docs to make the docs live.

Local install
npx docs-skills install
Try in MCP
@docsbook find_skill "docs-publish"

docs-publish

Publishes a local documentation folder to a new public GitHub repository.

Arguments#

Before Starting#

Step 1 — Validate Docs Folder#

Step 2 — Git Init and Commit#

cd <path>
git init
git add .
git commit -m "docs: initial documentation"
git branch -M main

Step 3 — Create GitHub Repo and Push#

# Use HTTPS to avoid SSH key issues
GH_TOKEN=$(gh auth token)
gh repo create {owner}/{repo} --public --description "{description}" 2>&1
git remote add origin https://{owner}:$GH_TOKEN@github.com/{owner}/{repo}.git
git push -u origin main

Note: if gh repo create --source fails due to workflow scope, create the repo first then push separately.

Step 4 — Verify#

Output#

✅ Published!
🐙 GitHub:   https://github.com/{owner}/{repo}
📚 Docsbook: https://docsbook.io/{owner}/{repo}

Next: run /docs-setup-workspace to configure branding and AI.

Error Handling#

View source on GitHub →Browse full catalog repo →
Keywords
publishgithubgitcommitpushrepo