Skip to main content
Hostwares

Deploy Triggers & Webhooks

Redeploy a Hostwares site on git push, from CI/CD with an API key, or from an AI agent.

Overview

There are three ways to start a deploy without opening the dashboard:

TriggerSet upGood for
Git pushConnect the repo with the Hostwares GitHub appEvery push to your deploy branch
API callAn API key from Dashboard → API KeysCI/CD pipelines, scripts, n8n/Zapier
AI agentThe Hostwares MCP server or the hw CLIClaude, Cursor and other agents

Deploy on Git Push

When your site is connected to a GitHub repository through the Hostwares GitHub app, a push to the site's branch starts a new deploy. The current release keeps serving until the new build is up.

  • Only the branch set on the site triggers a deploy. Pushes to other branches are ignored.
  • Turn it off in the site's Settings tab (Auto-deploy) if you want to deploy by hand.
  • Several pushes in a row start one build, not one build per push.

Deploy from CI/CD

Create an API key in Dashboard → API Keys and store it as a secret in your CI. Then:

curl -X POST https://hostwares.com/api/sites/$SITE_ID/stack/site/redeploy \
  -H "Authorization: Bearer $HOSTWARES_API_KEY"

The deploy runs in the background. Check progress with GET /api/sites/$SITE_ID or in the dashboard. A key only reaches sites on its own account.

GitHub Actions

# .github/workflows/deploy.yml
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - run: |
          curl -fsS -X POST https://hostwares.com/api/sites/${{ secrets.HOSTWARES_SITE_ID }}/stack/site/redeploy \
            -H "Authorization: Bearer ${{ secrets.HOSTWARES_API_KEY }}"

n8n / Zapier

Use an HTTP Request node: POST to the URL above with the Authorization: Bearer header. Treat the key like a password.

Deploy from an AI Agent

With the Hostwares MCP server connected, an agent can call redeploy_site, follow it with get_status, and use rollback_site to go back one deploy if something breaks. The same works from the hw CLI.

Outbound Notifications (Roadmap)

Push notifications when a deploy finishes or fails (to Slack, Discord or your own endpoint) are not available yet. Until then:

  • Deploy results appear in your dashboard notifications.
  • Poll GET /api/sites/:id from n8n/Zapier and relay status changes yourself.