# The instant a deploy finishes.

> Get a push when a deployment succeeds or fails. Add one step to GitHub Actions, GitLab CI, or Jenkins and deploy results reach your phone in seconds.

<!-- source: https://pocketalert.app/use-cases/deployment-alerts -->

Add one notification step to GitHub Actions, GitLab CI, or Jenkins, or point a Vercel or Netlify deploy webhook at Pocket Alert. The deploy result reaches your phone within a second of the job finishing, with the commit, branch, and environment attached.

## Three steps to deploy alerts

1. **Get the key or webhook URL** — Create an API key for a CLI or curl call, or a webhook and copy its receive URL.
2. **Add a step or webhook** — Add a notify step to your pipeline, or paste the receive URL into Vercel or Netlify deploy notifications.
3. **Ship with confidence** — Ship a release and your phone buzzes with the result, commit, and environment.

## Every release on your phone

When a release fails quietly, you hear about it in seconds, long before a user reports the broken site.

- **Drops into any pipeline** — GitHub Actions, GitLab CI, Jenkins, and CircleCI each need one step at the end of the pipeline.
- **Success or failure** — Send on success, on failure, or both. Run the notify step on if: failure() to hear only about broken releases.
- **Deploy context** — Put the commit, branch, environment, and run URL in the message so you know exactly what shipped.
- **Per-environment channels** — A separate app per environment keeps prod, staging, and preview deploys in their own channels.
- **Instant on finish** — The push lands when the job ends, so you can close the pipeline tab.
- **Zero setup** — One CLI call or curl in your job. There is no Slack bot to install.

## Notify on every deploy

### 1. CI/CD pipeline (CLI or curl)

Add one step at the end of your GitHub Actions, GitLab CI, Jenkins, or CircleCI job. With the CLI:

```
pocketalert send -t "Deploy succeeded" -m "prod @ v2.4.0"
```

Or curl the messages API directly so there is nothing to install on the runner:

```
curl -X POST "https://api.pocketalert.app/v1/messages" \
  -H "Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Deploy succeeded","message":"prod @ v2.4.0","level":"silent"}'
```

### 2. Vercel or Netlify (webhook)

Create a webhook so Vercel or Netlify can POST its own deploy payload to Pocket Alert. The `message` field is a GJSON template that maps their fields into the push:

```
curl -X POST "https://api.pocketalert.app/v1/webhooks" \
  -H "Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Vercel deploy","message":"%type%: %payload.project.name% on %payload.deployment.target%","application_id":"qm47b9pzxzxg"}'
```

You get a receive URL like `https://p4a.me/wh/1234abcd`. Paste it into Vercel's webhook settings (events such as `deployment.succeeded`). For Netlify, add it as a deploy notification outgoing webhook and map its fields, for example `%name% is %state% on %branch%`.

The [webhook settings docs](https://info.pocketalert.app/api/webhooks/settings.html) cover the messages API and GJSON field mapping.

## FAQ

### How do I get deploy notifications?

Add a notification step at the end of your pipeline in GitHub Actions, GitLab CI, Jenkins, or CircleCI. Run the Pocket Alert CLI or a curl call, and the deploy result arrives as a push notification as soon as the job ends.

### Can I alert only on failed deploys?

Yes. Use the job status to send a success or failure message, and run the notify step only on if: failure() so a broken release is the alert you get.

### Can I include the commit and environment?

Put the commit, branch, environment, and pipeline URL in the message body. The alert then tells you what shipped and where, and links straight to the run.

### Which CI/CD tools are supported?

Anything that runs a command works: GitHub Actions, GitLab CI, Jenkins, CircleCI, Bitbucket Pipelines, or a plain deploy script. For Vercel and Netlify, create a Pocket Alert webhook and paste its receive URL into their deploy notification settings.

### Can I split prod and staging alerts?

Create a separate application per environment for prod, staging, and preview. Production deploys then land in their own channel, and you can tell releases apart at a glance.

### Can a failed production deploy break through Do Not Disturb?

Yes. Send failed deploys with level=critical: Android posts them on a dedicated channel that bypasses Do Not Disturb, and iPhone shows them as time-sensitive notifications that break through Focus. Routine success pings can go out with level=silent, so they sit in history without a buzz.
