How to Monitor Your GitHub Actions CI/CD Pipeline with Vigilmon
GitHub Actions is the CI/CD backbone for millions of projects. When your pipeline breaks — whether from a flaky test, an expired secret, or a GitHub outage — you need to know immediately. But GitHub Actions itself doesn't alert you when a workflow silently starts failing.
This guide shows you how to add real monitoring to your GitHub Actions pipeline using Vigilmon.
The Gap in GitHub Actions Monitoring
GitHub Actions sends email notifications for failed runs — but only to the person who pushed the commit. If a scheduled workflow fails (nightly builds, weekly dependency updates, health checks), nobody gets notified unless they happen to check the Actions tab.
Common scenarios where GitHub Actions monitoring matters:
- Nightly builds silently failing for weeks
- Scheduled dependency updates broken after a package change
- Deployment pipelines stuck on a flaky test
- Backup/sync jobs silently stopped
- GitHub itself having an outage affecting your CI
Approach 1: Ping Vigilmon from Your Workflow
The simplest approach: add a step that pings Vigilmon at the end of each successful run. If Vigilmon doesn't receive a ping within the expected interval, it alerts you.
# .github/workflows/nightly-build.yml
name: Nightly Build
on:
schedule:
- cron: '0 2 * * *' # 2 AM UTC daily
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build production
run: npm run build
- name: Notify Vigilmon (heartbeat)
if: success()
run: |
curl -s "https://hb.vigilmon.online/YOUR_MONITOR_SLUG" \n --data '{"status":"ok","message":"Nightly build succeeded"}'
In Vigilmon, configure this as a heartbeat monitor — if it doesn't receive a ping every 25 hours, it alerts you.
Approach 2: Health Endpoint for Deployment Status
For continuous deployment pipelines, expose a version endpoint in your app and monitor it:
# .github/workflows/deploy.yml
name: Deploy to Production
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy
run: ./deploy.sh
- name: Verify deployment
run: |
# Wait for deployment to propagate
sleep 30
# Check that the new version is live
VERSION=$(curl -s https://yourapp.com/version | jq -r '.version')
EXPECTED=$(cat package.json | jq -r '.version')
if [ "$VERSION" != "$EXPECTED" ]; then
echo "Deployment verification failed: expected $EXPECTED, got $VERSION"
exit 1
fi
echo "Deployment verified: $VERSION is live"
Add a /version endpoint to your app:
app.get('/version', (req, res) => {
res.json({
version: process.env.APP_VERSION || require('./package.json').version,
deployed_at: process.env.DEPLOY_TIME || new Date().toISOString(),
commit: process.env.GITHUB_SHA || 'local'
});
});
Then monitor https://yourapp.com/version with Vigilmon to ensure deployments succeed and the app stays up.
Approach 3: Monitor GitHub Actions API
For teams with GitHub token access, you can create a health endpoint that checks your workflow run status:
// Health endpoint that checks GitHub Actions status
app.get('/health/ci', async (req, res) => {
const response = await fetch(
`https://api.github.com/repos/${OWNER}/${REPO}/actions/runs?per_page=1&branch=main`,
{ headers: { Authorization: `token ${process.env.GITHUB_TOKEN}` } }
);
const data = await response.json();
const lastRun = data.workflow_runs?.[0];
if (!lastRun || lastRun.conclusion === 'failure') {
return res.status(503).json({
status: 'failing',
last_run: lastRun?.conclusion,
run_url: lastRun?.html_url
});
}
res.json({
status: 'ok',
last_run: lastRun.conclusion,
branch: lastRun.head_branch
});
});
Setting Up the Vigilmon Monitors
For heartbeat monitoring (scheduled jobs):
- Go to vigilmon.online and sign up free
- Add Monitor → Heartbeat Monitor
- Copy the ping URL and paste it into your GitHub Actions workflow
- Set the expected interval: e.g., 25h for a daily job (gives 1h grace period)
- Alert if no ping received within the interval
For deployment verification:
- Add Monitor → HTTP(S) Monitor
- URL:
https://yourapp.com/healthorhttps://yourapp.com/version - Interval: 1 minute
- This catches post-deployment outages within 60 seconds
Recommended CI/CD Monitoring Setup
| Monitor | Type | Alert If |
|---|---|---|
| Nightly build | Heartbeat | No ping in 25h |
| Production health | HTTP | Status != 200 |
| Version endpoint | HTTP | Version mismatch |
| Staging health | HTTP | Status != 200 |
Monitoring GitHub's Own Status
If GitHub Actions itself goes down, you'll want to know. Add a monitor for:
-
https://githubstatus.com— GitHub's official status page - Your own deployment endpoints — to confirm whether it's GitHub or your app
Summary
GitHub Actions monitoring closes a real gap: scheduled and automated workflows that fail silently. With Vigilmon:
- Heartbeat monitors catch when scheduled jobs stop running
- HTTP monitors catch post-deployment regressions within 60 seconds
- Multi-location checks distinguish GitHub outages from your app's failures
Start monitoring your CI/CD pipeline free at vigilmon.online.
Top comments (0)