Skip to main content
Skip to main content

CI/CD on Zerops

Keywords

ci cd, github, gitlab, github actions, gitlab ci, webhook, automatic deploy, trigger, pipeline, continuous deployment, zcli push, jenkins, circleci, generic ci

TL;DR

Zerops supports GitHub/GitLab webhook triggers (new tag or push to branch) and GitHub Actions / GitLab CI via zcli push with an access token.

GitHub Integration (Webhook)

Setup (GUI)

  1. Service detail → Build, Deploy, Run Pipeline Settings
  2. Connect with GitHub repository
  3. Select repo + authorize (requires full access for webhooks)
  4. Choose trigger: New tag (optional regex filter) or Push to branch

GitHub Actions

# .github/workflows/deploy.yaml
name: Deploy
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: zeropsio/actions@main
with:
access-token: ${{ secrets.ZEROPS_TOKEN }}
service-id: <service-id>
  • access-token: From Settings → Access Token Management
  • service-id: From service URL or three-dot menu → Copy Service ID

GitLab Integration (Webhook)

Setup (GUI)

  1. Service detail → Build, Deploy, Run Pipeline Settings
  2. Connect with GitLab repository
  3. Authorize (requires full access for webhooks)
  4. Choose trigger: New tag (optional regex) or Push to branch

Skip Pipeline

Include ci skip or skip ci in commit message (case-insensitive).

Disconnect

Service detail → Build, Deploy, Run → Stop automatic build trigger.

Gotchas

  1. Full repo access required: Webhook integration needs full access to create/manage webhooks
  2. ci skip in commit message: Prevents pipeline trigger — useful for docs-only changes
  3. Service ID not obvious: Find it in service URL or three-dot menu → Copy Service ID

GitLab CI

# .gitlab-ci.yml
deploy:
stage: deploy
image: ubuntu:latest
script:
- apt-get update && apt-get install -y curl
- curl -L https://zerops.io/zcli/install.sh | sh
- zcli login $ZEROPS_TOKEN
- zcli push --project-id $ZEROPS_PROJECT_ID --service-id $ZEROPS_SERVICE_ID
only:
- main

Generic CI (Any System)

Any CI system with shell access can deploy via zcli push:

  1. Install zcli: curl -L https://zerops.io/zcli/install.sh | sh
  2. Authenticate: zcli login <access-token>
  3. Deploy: zcli push --project-id <id> --service-id <id>

zcli push key flags

FlagDescription
--project-idTarget project ID
--service-idTarget service ID
--setupzerops.yml setup name (if different from service hostname)
--version-nameCustom version label (e.g. git tag)
--workspace-stateall (default), clean (git clean), staged (staged only)
--no-gitDeploy without git context
--deploy-git-folderInclude .git/ directory in deploy

See Also

  • zerops://themes/core -- zerops.yml schema reference
  • zerops://guides/deployment-lifecycle -- build and deploy pipeline
  • zerops://themes/core -- platform infrastructure