Skip to content

Auto-deploy

When creating a service from a Git app, auto-deploy on Git push is enabled by default.

You can customize this behavior:

  • Disable auto-deploy if you don’t want deployments triggered on every push
  • Automatically clean up the deployment queue (enabled by default), this ensures that if multiple pushes happen in quick succession, only the latest one is deployed.
  • Add watch paths to restrict auto-deploys to changes in specific files or directories.
    These are defined using Glob patterns (e.g., frontend/**, {packages/trpc,packages/db,apps/web}/**).
Service Auto-deploy options

Deployments triggered by a Git push will appear with the label git push:

Git push deployment

Using the API, you can trigger a new deployment for a service without needing to create a git apps. This can be used to trigger a deployment in a Continuous Integration script after a git push.

Automate your deployment workflow with GitHub Actions to update your application whenever changes are pushed to your repository:

  1. Get your ZaneOps deployment webhook URL: Navigate to service details page > settings > Deploy section > deploy webhook url Locating the deployment webhook URL

  2. Store your secrets in GitHub: Navigate to GitHub repository > settings > secrets and variables > actions and add:

    • DEPLOY_WEBHOOK_URL: Your ZaneOps webhook URL Adding repository secrets
  3. Create a GitHub Actions workflow file in your repository:

    .github/workflows/ci.yaml
    name: Deploy
    on:
    push:
    branches: [main] # customize as needed
    jobs:
    build-push-app:
    name: Build and Deploy Guestbook
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
    uses: actions/checkout@v4
    - name: Deploy to ZaneOps
    run: curl -f -o /dev/null -X PUT "${{ secrets.DEPLOY_WEBHOOK_URL }}"
  4. With this workflow in place, changes pushed to your main branch will automatically trigger a new deployment, it will show in the list with the label API :

    Service deployed via API