CI/CD
Deploy Hooks
GitHub auto-deploy is configured on the project, not a deploy-hook URL. There is no Settings → Deploy Hooks page and no unsigned /deploy-hooks/:token endpoint. Prefer Autodeploy on push; use the deployments build API when CI must run first.
Authenticate with a personal access token (kbr_pat_). Watch the result on the app Deployment tab. Settings changes still apply through canvas Commit.
Triggering a deploy
# Queue a build for pipeline/phase/app
curl -X POST "https://api.stackblaze.cloud/api/deployments/build/{pipeline}/{phase}/{app}" \
-H "Authorization: Bearer $STACKBLAZE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"buildstrategy":"nixpacks","repository":"https://github.com/org/repo","reference":"main"}'
# Then watch the app Deployment tab
GitHub Actions example
name: Deploy to StackBlaze
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Run tests
run: npm test
- name: Deploy to StackBlaze
run: |
curl -X POST "https://api.stackblaze.cloud/api/deployments/build/{pipeline}/{phase}/{app}" \
-H "Authorization: Bearer $STACKBLAZE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"buildstrategy":"nixpacks","repository":"https://github.com/org/repo","reference":"main"}'
env:
STACKBLAZE_TOKEN: $${ secrets.STACKBLAZE_TOKEN }
Common use cases
CircleCI
After tests pass, POST a build with your token instead of relying on a git push.
Jenkins
Add a post-build step that calls the deployments build API once the pipeline is green.
Custom scripts
Call the same POST from any shell script, Makefile target, or deployment automation.
Zapier / n8n
Use an HTTP Request node with Authorization: Bearer and the JSON body below.
GitHub Actions
Prefer the project Autodeploy webhook. Use the build API when CI must run first.
Redeploy from the dashboard
On the Deployment tab, Redeploy runs the build again (git) or restarts the current image (Docker).
Rate limit
Prefer the project's git webhook for push-to-deploy. Use the deployments build API when CI must run first. A second build for the same app waits until the current one finishes.
Under the hood
- Personal access token:
kbr_pat_tokens inherit the creator's organization and RBAC. Revoke them from Settings → API tokens. - Build queue:
POST /api/deployments/build/{pipeline}/{phase}/{app}starts or queues a build for that app. - Phases: production and review (or a custom phase) are separate namespaces. Address them in the path, not with a hook query string.
Step by step
Create an API token
Create a personal access token in Settings → API tokens (prefix kbr_pat_). Store it as a CI secret. The token is scoped to your organization and RBAC — there is no separate unsigned deploy-hook URL.
Store the token as a secret
Treat the token like a password. Store it as an encrypted secret in your CI system (CircleCI environment variable, GitHub Actions secret, etc.) and never commit it to version control.
POST a build
POST https://api.stackblaze.cloud/api/deployments/build/{pipeline}/{phase}/{app} with Authorization: Bearer $STACKBLAZE_TOKEN and JSON { buildstrategy, repository, reference }. That queues a build for the named app. If the project already auto-deploys on git push, skip this and rely on the GitHub webhook.
Monitor the deploy
Watch the Deployments tab in the dashboard, or poll GET /api/deployments/{pipeline}/{phase}/{app} and GET /api/apps/{pipeline}/{phase}/{app}/status.