CI/CD Pipelines
Ping DeadPing after deployments or create monitors dynamically in your pipeline.
DeadPing integrates with CI/CD pipelines to monitor scheduled workflows. Add a ping to the end of your GitHub Actions, GitLab CI, or CircleCI pipeline to detect when scheduled runs silently stop executing, get disabled, or fail without notification.
GitHub Actions
.github/workflows/deploy.yml
name: Deploy & Monitor
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to production
run: ./deploy.sh
- name: Ping DeadPing (deploy heartbeat)
run: curl -fsS --retry 3 https://deadping.io/api/ping/${{ secrets.DEADPING_DEPLOY_TOKEN }}
- name: Ensure backup monitor exists
env:
DEADPING_API_KEY: ${{ secrets.DEADPING_API_KEY }}
run: |
curl -sf https://deadping.io/api/monitors \
-H "X-API-Key: $DEADPING_API_KEY" | \
jq -e '.[] | select(.name == "prod-nightly-backup")' > /dev/null 2>&1 || \
curl -X POST https://deadping.io/api/monitors \
-H "X-API-Key: $DEADPING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-nightly-backup",
"expected_interval_seconds": 86400,
"grace_period_seconds": 600
}'Store DEADPING_API_KEY and DEADPING_DEPLOY_TOKEN in your repo's Settings → Secrets and variables.
GitLab CI
.gitlab-ci.yml
stages:
- deploy
- verify
deploy:
stage: deploy
script:
- ./deploy.sh
only:
- main
ping-deadping:
stage: verify
script:
- curl -fsS --retry 3 https://deadping.io/api/ping/$DEADPING_DEPLOY_TOKEN
variables:
DEADPING_DEPLOY_TOKEN: $DEADPING_DEPLOY_TOKEN
only:
- mainCircleCI
.circleci/config.yml
version: 2.1
jobs:
deploy:
docker:
- image: cimg/base:stable
steps:
- checkout
- run:
name: Deploy
command: ./deploy.sh
- run:
name: Ping DeadPing
command: curl -fsS --retry 3 https://deadping.io/api/ping/$DEADPING_DEPLOY_TOKEN
workflows:
deploy-and-monitor:
jobs:
- deploy:
filters:
branches:
only: main