Guides / Platforms & Tools
Deployments are the highest-risk moment in software. When an incident happens, the first question is "was there a recent deploy?" If you log deployments to LogIt, you can answer that question in one glance at your timeline.
In your GitHub repository → Settings → Secrets and variables → Actions, add:
LOGIT_API_KEY — your LogIt project API key# .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: ./scripts/deploy.sh
- name: Log deployment to LogIt
if: success()
run: |
curl -s -X POST https://api.logit.now/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.LOGIT_API_KEY }}" \
-d '{
"channel": "deployments",
"event": "Production deployment succeeded",
"description": "Commit ${{ github.sha }} deployed by ${{ github.actor }}",
"icon": "🚀",
"notify": true,
"tags": {
"branch": "${{ github.ref_name }}",
"actor": "${{ github.actor }}"
},
"metadata": {
"sha": "${{ github.sha }}",
"runId": "${{ github.run_id }}",
"workflow": "${{ github.workflow }}"
}
}'
- name: Log deployment failure to LogIt
if: failure()
run: |
curl -s -X POST https://api.logit.now/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.LOGIT_API_KEY }}" \
-d '{
"channel": "deployments",
"event": "Production deployment failed",
"description": "Commit ${{ github.sha }} failed — run ${{ github.run_id }}",
"icon": "❌",
"notify": true,
"tags": { "branch": "${{ github.ref_name }}", "status": "failed" },
"metadata": { "sha": "${{ github.sha }}", "runId": "${{ github.run_id }}" }
}'
| Field | Value |
|---|---|
| Name | Consecutive deploy failures |
| Channel | deployments |
| Event name | Production deployment failed |
| Threshold | 2 |
| Window | 1 hour |
| Cooldown | 2 hours |
| Action | Push notification |
deployments-staging channel to keep the production timeline clean.Try LogIt free
7-day trial. No credit card required.