Integrations / Platforms / GitHub Actions
Log CI/CD events to LogIt directly from GitHub Actions workflows. Use `curl` to call the REST API โ no SDK needed.
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build & deploy
run: |
npm ci
npm run build
# your deploy command here
- name: Notify LogIt on success
if: success()
run: |
curl -X POST https://api.logit.now/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.LOGIT_API_KEY }}" \
-d '{
"channel": "deploys",
"event": "Deploy succeeded",
"description": "Commit ${{ github.sha }} deployed to production",
"icon": "๐",
"notify": true,
"tags": { "branch": "${{ github.ref_name }}", "actor": "${{ github.actor }}" },
"metadata": {
"sha": "${{ github.sha }}",
"run_id": "${{ github.run_id }}",
"actor": "${{ github.actor }}"
}
}'
- name: Notify LogIt on failure
if: failure()
run: |
curl -X POST https://api.logit.now/api/ingest \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.LOGIT_API_KEY }}" \
-d '{
"channel": "errors",
"event": "Deploy failed",
"description": "Run ${{ github.run_id }} failed on main",
"icon": "โ",
"notify": true
}'
In your repo, go to Settings โ Secrets and variables โ Actions โ New repository secret.
| Name | Value |
|---|---|
LOGIT_API_KEY | lk_live_xxxxxxxxxxxxxxxx |
Works for tests, releases, scheduled jobs โ anything you run in Actions. Just add the curl step with if: success() or if: failure().
Ready to connect GitHub Actions?
7-day free trial. No credit card required.