Skip to content

Automation

Use the CLI from GitHub Actions or GitLab CI:

.github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install StackBlaze CLI
run: curl -fsSL https://stackblaze.com/install.sh | sh
- name: Deploy
env:
STACKBLAZE_API_URL: https://api.stackblaze.cloud
STACKBLAZE_TOKEN: ${{ secrets.STACKBLAZE_TOKEN }}
run: stackblaze up --ci -y --pipeline my-app --phase production --app web

If the project already auto-deploys on git push, you do not need this workflow.

You can also POST /api/deployments/build/{pipeline}/{phase}/{app} with a kbr_pat_ bearer token. OpenAPI: https://api.stackblaze.cloud/api/docs. MCP: see StackBlaze for Agents.