Skip to content

Add CI checks and CD deploy pipeline#12

Open
charitra-prem wants to merge 1 commit into
mainfrom
chore/ci-docs-checks
Open

Add CI checks and CD deploy pipeline#12
charitra-prem wants to merge 1 commit into
mainfrom
chore/ci-docs-checks

Conversation

@charitra-prem

Copy link
Copy Markdown
Contributor

What this adds

Two GitHub Actions workflows and a cspell config. No production behavior changes until you set the secrets at the bottom.

CI — `.github/workflows/docs-checks.yml`

Fires on every pull request to `main`. Two parallel jobs:

  • Mintlify build + broken links. Installs the `mint` CLI and runs `mint broken-links`. This single command also catches MDX parse errors and `docs.json` schema errors, because `mint` refuses to start if either is broken.
  • Spell check (cspell). Runs cspell against every `.mdx` file. Configured for `en` + `en-GB` so the British spellings already in the docs pass, plus a custom `words` list for service names (Linear, Notion, Atlassian, Cloudflare…), Fluso terminology (DCR, BYO, reauth, customization), and proper nouns that appear in existing pages (Tunguz, Apaleo, Tetris, Xero).

Both jobs are advisory today — there's no branch protection requiring them. PR will go red on failure but won't be blocked. Flip on required status checks in repo Settings → Branches → Branch protection rules when you trust the noise level.

CD — `.github/workflows/deploy.yml`

Fires on push to `main` and on manual `workflow_dispatch`. Hits Mintlify's redeploy API:

```
POST https://api.mintlify.com/v1/project/update/\${MINTLIFY_PROJECT_ID}
Authorization: Bearer ${MINTLIFY_API_KEY}
```

  • Concurrency-guarded (`group: mintlify-deploy`) so two pushes don't race each other.
  • Fails fast and visibly if the secrets aren't configured, instead of silently no-op.
  • Surfaces the API's HTTP code and response body in the run log so deploy failures are debuggable.

What you need to do to turn deploy on

  1. Get a Mintlify API key. Mintlify dashboard → Settings → API Keys → create one with deploy scope.
  2. Get your project ID. Same dashboard → Settings → look for project ID, or pull it from the dashboard URL.
  3. Add both as repo secrets at https://github.com/premAI-io/docs/settings/secrets/actions:
    • `MINTLIFY_API_KEY`
    • `MINTLIFY_PROJECT_ID`
  4. Merge this PR. The CI job runs once on the PR itself, then the deploy fires the first time on the merge commit.
  5. Verify the first deploy. Repo → Actions tab → "deploy to Mintlify" run. The HTTP code and body show up in the step log.
  6. Optional — manual redeploy button. Repo → Actions → "deploy to Mintlify" → Run workflow triggers a deploy on demand.

If the API endpoint or auth shape differs from what Mintlify wants today, the workflow will fail loudly on the first run and the response body in the log will tell us what to adjust.

🤖 Generated with Claude Code

CI (.github/workflows/docs-checks.yml) runs on every PR to main:
- Mintlify build + broken-links check (also catches MDX parse and
  docs.json schema errors since mint refuses to start on either).
- cspell against every .mdx file, configured for en + en-GB with a
  custom allowlist for service names, Fluso terminology, and a few
  proper nouns that show up in the existing docs.

CD (.github/workflows/deploy.yml) fires on push to main and on manual
workflow_dispatch. Hits Mintlify's redeploy API endpoint with a
Bearer API key. Concurrency-guarded so two pushes don't race.
Refuses to run if the required repo secrets aren't set, so the
failure mode is obvious rather than silently no-op.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant