CI/CD Integration
Notebind integrates into CI/CD pipelines for automated document publishing. Push documentation on every commit, collect feedback, and pull it back into your workflow.
GitHub Actions
Section titled “GitHub Actions”Push docs on merge to main
Section titled “Push docs on merge to main”name: Publish docs to Notebindon: push: branches: [main] paths: ['docs/**/*.md']
jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Install Notebind CLI run: cargo install notebind
- name: Push changed docs env: NOTEBIND_API_KEY: ${{ secrets.NOTEBIND_API_KEY }} run: | notebind auth --token "$NOTEBIND_API_KEY" for file in docs/*.md; do notebind push "$file" doneCollect feedback as PR comments
Section titled “Collect feedback as PR comments”name: Check Notebind feedbackon: schedule: - cron: '0 9 * * 1-5' # Weekdays at 9am
jobs: feedback: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Install tools run: cargo install notebind
- name: Check for unresolved feedback env: NOTEBIND_API_KEY: ${{ secrets.NOTEBIND_API_KEY }} run: | notebind auth --token "$NOTEBIND_API_KEY" notebind list | jq -r '.[].id' | while read doc_id; do comments=$(notebind comments "$doc_id" | jq 'length') suggestions=$(notebind suggestions "$doc_id" | jq 'length') if [ "$comments" -gt 0 ] || [ "$suggestions" -gt 0 ]; then echo "Document $doc_id has $comments unresolved comments and $suggestions pending suggestions" fi doneUsing the API directly
Section titled “Using the API directly”If you prefer curl over the CLI:
- name: Push document via API run: | CONTENT=$(cat docs/readme.md | jq -Rs .) curl -X POST https://notebind.com/api/documents \ -H "Authorization: Bearer ${{ secrets.NOTEBIND_API_KEY }}" \ -H "Content-Type: application/json" \ -d "{\"title\": \"README\", \"content\": $CONTENT}"Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
NOTEBIND_API_KEY | Your API key (store as a repository secret) |
NOTEBIND_API_URL | Custom API URL for self-hosted instances |
Common patterns
Section titled “Common patterns”Push on merge, review on PR
Section titled “Push on merge, review on PR”- PR opened → agent generates docs → pushes to Notebind → shares link in PR comment
- Reviewer opens share link → leaves comments
- Agent polls for feedback → updates PR
- PR merged → final docs pushed to Notebind
Nightly feedback digest
Section titled “Nightly feedback digest”Run a scheduled job that:
- Lists all documents
- Checks each for unresolved comments/suggestions
- Creates an issue or Slack message with the digest
Auto-accept simple suggestions
Section titled “Auto-accept simple suggestions”# Accept all pending suggestions on a documentnotebind suggestions DOC_ID | \ jq -r '.[] | select(.status == "pending") | .id' | \ while read sid; do notebind accept DOC_ID "$sid" done