PingBase GitHub Action

Pause monitors during deploys, resume when done

All plans 5 minutes to set up

Why bother?

During a deployment, your app is briefly unavailable — containers restarting, load balancers draining. Without this integration, PingBase fires a "DOWN" alert every deployment, and your on-call team gets trained to ignore alerts. That's the worst outcome in monitoring.

The GitHub Action pauses your monitors before the deploy step and resumes them after. Zero false positives.

Quick start

Add this to your workflow file. Replace the monitor IDs with your own (find them in your dashboard URL or via the API).

name: Deploy

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Pause PingBase monitors
        uses: pingbase/pause-monitor-action@v1
        with:
          api-key: ${{ secrets.PINGBASE_API_KEY }}
          monitor-ids: "mon_abc123,mon_def456"

      - name: Deploy
        run: |
          # your deploy command here

      - name: Resume PingBase monitors
        if: always()
        uses: pingbase/resume-monitor-action@v1
        with:
          api-key: ${{ secrets.PINGBASE_API_KEY }}
          monitor-ids: "mon_abc123,mon_def456"

The if: always() on the resume step ensures monitors are re-enabled even if the deployment fails.

Get your API key

  1. 1
    Go to Settings → API Keys in your PingBase dashboard.
  2. 2
    Click Create API key. Give it a descriptive name like "GitHub Actions".
  3. 3
    Copy the key and add it as a repository secret named PINGBASE_API_KEY in your GitHub repo under Settings → Secrets and variables → Actions.

Find your monitor IDs

Use the API to list your monitors and get their IDs:

curl https://pingbase-worker.workers.dev/api/monitors \
  -H "Authorization: Bearer YOUR_API_KEY"

Each monitor in the response has an id field. Pass them as a comma-separated list in the workflow.

Or use the API directly

If you prefer not to use the marketplace action, you can call the PingBase API with curl directly in your workflow:

- name: Pause monitors
  run: |
    curl -X PATCH https://pingbase-worker.workers.dev/api/monitors/mon_abc123 \
      -H "Authorization: Bearer ${{ secrets.PINGBASE_API_KEY }}" \
      -H "Content-Type: application/json" \
      -d '{"paused": true}'

- name: Resume monitors
  if: always()
  run: |
    curl -X PATCH https://pingbase-worker.workers.dev/api/monitors/mon_abc123 \
      -H "Authorization: Bearer ${{ secrets.PINGBASE_API_KEY }}" \
      -H "Content-Type: application/json" \
      -d '{"paused": false}'

Ready to set this up?

API keys work on all PingBase plans — including the free tier.

Start free →