speak-mintlify into your CI/CD pipeline ensures your documentation audio stays in sync with content changes automatically.
GitHub Actions
Basic Workflow
Create a workflow file to generate audio on every push to your documentation:Configure secrets
Add the following secrets in your GitHub repository settings (Settings → Secrets and variables → Actions):Secrets (sensitive values):
FISH_API_KEY- Your Fish Audio API keyS3_ACCESS_KEY_ID- S3 access keyS3_SECRET_ACCESS_KEY- S3 secret keyS3_BUCKET- Your S3 bucket name
S3_PUBLIC_URL- Public URL for your S3 bucketS3_REGION- S3 region (e.g.,us-east-1)S3_ENDPOINT- S3 endpoint URL (optional, for R2/MinIO)
Advanced Workflow with Cleanup
Automatically remove orphaned audio files:.github/workflows/tts-advanced.yaml
The
[skip ci] tag in the commit message prevents the workflow from triggering itself in an infinite loop.Preview Changes with Pull Requests
Run in dry-run mode on pull requests to preview changes:.github/workflows/tts-preview.yaml
GitLab CI/CD
For GitLab repositories, create.gitlab-ci.yml:
.gitlab-ci.yml
CircleCI
Create.circleci/config.yml:
.circleci/config.yml
Troubleshooting
Workflow fails with 'Missing required configuration'
Workflow fails with 'Missing required configuration'
Ensure all required secrets and variables are configured:
FISH_API_KEYS3_ACCESS_KEY_IDS3_SECRET_ACCESS_KEYS3_BUCKETS3_PUBLIC_URL
Git push fails with 'Permission denied'
Git push fails with 'Permission denied'
For GitHub Actions, ensure the workflow has write permissions:For GitLab, create a CI/CD variable
CI_PUSH_TOKEN with an access token that has write_repository scope.Workflow triggers infinite loop
Workflow triggers infinite loop
Add Or configure the workflow to skip commits from the bot:
[skip ci] or [ci skip] to your commit message:S3 upload fails with 403 Forbidden
S3 upload fails with 403 Forbidden
Verify your S3 credentials have the correct permissions:
s3:PutObject- Upload filess3:ListBucket- List objects for cleanups3:DeleteObject- Delete orphaned files
Files not being tracked in git
Files not being tracked in git
Check that MDX files aren’t in
.gitignore. The workflow commits modified MDX files with audio components.If you want to keep MDX files clean, you can:- Store generated components separately
- Use a different branch for generated content
- Configure
--dry-runmode and handle uploads externally
Best Practices
Use workflow_dispatch
Allow manual workflow triggers for testing and one-off regeneration.
Cache dependencies
Use
cache: 'npm' in setup-node to speed up workflows.Run cleanup periodically
Schedule cleanup jobs weekly to remove orphaned files and reduce storage costs.
Monitor API usage
Track Fish Audio API usage to stay within your plan limits.
Next Steps
S3 Setup
Configure S3-compatible storage for your audio files
Fish Audio
Learn how to get API keys and choose voices
