← Docs
Score every content change in a PR. Post a verdict comment. Block merge on FAIL or BLOCKER (a hard stop, e.g. a confidentiality leak) by default.
Quick start
Add this to .github/workflows/content-gate.yml:
name: Content Gate
on:
pull_request:
paths:
- "**/*.md"
- "**/*.mdx"
- "**/*.html"
jobs:
dokeo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dokeo/action@v1
with:
api_key: ${{ secrets.DOKEO_API_KEY }}
content_type: blog_post
paths: "**/*.md"
fail_on: fail
min_score: 70
comment_pr: true
env:
PR_NUMBER: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Get your API key at /account/api-keys and add it to repo secrets as DOKEO_API_KEY.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
| api_key | yes | - | Your Dokeo API key (dk_...) |
| content_type | no | blog_post | blog, landing_page, listicle, faq, etc. |
| paths | no | **/*.{md,mdx,html,txt} | Glob of files to scan |
| fail_on | no | fail | blocker | fail | warning | optimization (minimum severity that blocks the check) |
| min_score | no | 0 | Minimum overall score (0-100) |
| comment_pr | no | true | Post PR comment with verdict |
Sample PR comment
Dokeo Content Gate
| PASS | 4 |
| OPTIMIZATION | 1 |
| WARNING | 1 |
| FAIL | 1 |
| BLOCKER | 0 |
- - PASS content/posts/intro.md -- PASS (87/100)
- - FAIL content/posts/broken.md -- FAIL (38/100)
- - WARN content/posts/draft.md -- WARNING (62/100)