CI/CD
Integrate the Fumastudio CLI into your CI/CD workflow.
Continuous Integration with Fumastudio
You can validate, bundle, and deploy your Bruno collections, environments, and snippets directly from your CI environment, ensuring your API documentation and test suites stay perfectly in sync across every deployment.
Once integrated, your CI system can:
- Run all your request assertions automatically.
- Detect breaking changes early in pull requests.
- Build and publish documentation to Fumastudio after each successful run.
The CLI exits with code
1when issues are detected, which ensures your CI job fails fast if assertions, schema validations, or environment mismatches occur.
Example: GitHub Actions Workflow
Below is a sample CI pipeline for GitHub Actions that uses Node 20 and Bun to install and run the Fumastudio CLI:
name: Deploy Fumastudio Collections
on:
push:
branches:
- main
- release/*
jobs:
deploy:
runs-on: ubuntu-latest
name: Fumastudio Deployment
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Bun and Fumastudio CLI
run: |
npm install -g bun @trythis/fuma-content
- name: Run collection assertions
run: npm run test
- name: Build and deploy Fumastudio docs
env:
FUMASTUDIO_API_KEY: ${{ secrets.FUMASTUDIO_API_KEY }}
CURRENT_BRANCH: ${{ github.ref_name }}
COMMIT_SHA: ${{ github.sha }}
COMMIT_MSG: ${{ github.event.head_commit.message }}
AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
run: |
fuma-content build "./collection" \
--api-key $FUMASTUDIO_API_KEY \
--bru-env Local \
--http-client bruno \
--branch $CURRENT_BRANCH \
--commit-msg $COMMIT_MSG \
--commit-hash $COMMIT_SHA \
--author-name $AUTHOR_NAME \
--author-email $AUTHOR_EMAILAlias
The cli has another alias for calling it. Use fsc