Summary of Changes: Discord Webhooks & Commit Tracking
Date: January 14, 2026
Status: ✅ Complete
Overview
Implemented three major improvements to the CI/CD pipeline:
- Separate Discord webhooks for commits vs. deployments
- Automatic commit tracking & recovery for missed Discord notifications
- Updated documentation with setup and troubleshooting guides
1. Separate Discord Webhook Channels
What Changed
Old setup (single webhook):
DISCORD_WEBHOOK_URL → All notifications (commits + deployments)New setup (separated):
DISCORD_WEBHOOK_COMMITS → #commits (all code pushes)
DISCORD_WEBHOOK_DEV_DEPLOY → #deployments (dev.ourlantern.app)
DISCORD_WEBHOOK_PROD_DEPLOY → #deployments (ourlantern.app)Benefits
- ✅ Less noise in deployment channel (only successes/failures shown)
- ✅ Audit trail of all commits in separate channel
- ✅ Easier to track what's deployed vs. what's committed
- ✅ Can mute one channel without missing important alerts
Files Modified
- .github/workflows/discord-notify.yml - Now uses
DISCORD_WEBHOOK_COMMITS - .github/workflows/deploy-dev.yml - Now uses
DISCORD_WEBHOOK_DEV_DEPLOY - .github/workflows/deploy-prod.yml - Now uses
DISCORD_WEBHOOK_PROD_DEPLOY
GitHub Secrets to Add
- Go to Settings → Secrets and variables → Actions
- Add these secrets (copy webhook URLs from Discord):
DISCORD_WEBHOOK_COMMITSDISCORD_WEBHOOK_DEV_DEPLOYDISCORD_WEBHOOK_PROD_DEPLOY
- Delete the old
DISCORD_WEBHOOK_URLsecret (deprecated)
2. Automatic Commit Tracking & Missed Notification Recovery
The Problem (Solved)
If Discord API was down or webhook was invalid:
- ❌ Commit notification failed to post
- ❌ Next push only showed new commits, not the failed one
- ❌ Commit history became incomplete in Discord
The Solution
New automatic recovery system:
- Each successful Discord notification is recorded in
.github/.discord-posted-commits - Before posting new commits, the workflow checks for missed ones
- If missed commits are found, they're automatically included in next notification
- Notification includes note: "⚠️ Note: Includes N previously missed commit(s)"
Example scenario:
Commit A (notification fails) → Recorded as failed
Commit B (notification succeeds) → Pushed, includes A + B with note
User sees both A and B in Discord ✅How It Works
Workflow:
Checkout codewith 50-commit historyCheck for previously missed Discord notifications- compare against posted listPrepare commit messages- include any missed commitsSend Discord notification- includes missed + new commitsTrack posted commits- record successful posts to.github/.discord-posted-commitsUpload posted commits log- save to artifacts for verification
Files Modified
- .github/workflows/discord-notify.yml
- Added missed commit detection
- Records posted commits after successful notification
- Uploads artifacts for verification
- .gitignore
- Added
.github/.discord-posted-commits(internal tracking file)
- Added
Testing the Recovery
- Create two commits: A and B
- Push commit A (notification fails - simulate by breaking webhook URL)
- Revert webhook URL
- Push commit B
- Check Discord - should see both A and B with note about missed commit
3. Documentation Updates
New Documentation
docs/engineering/deployment/DISCORD_WEBHOOK_SETUP.md
- Complete guide to creating Discord webhooks
- Step-by-step setup instructions
- Troubleshooting section
- Testing webhook URLs manually
Updated Documentation
docs/engineering/deployment/CICD_GUIDE.md
- Updated Discord Notification workflow description
- Added missed commit recovery explanation
- Updated troubleshooting section with new webhook names
- Link to DISCORD_WEBHOOK_SETUP.md
docs/engineering/deployment/BRANCH_PROTECTION_SETUP.md
- Updated secrets list to use new webhook names
- Link to DISCORD_WEBHOOK_SETUP.md
Next Steps (For You)
1. Create Discord Webhooks
- Go to your Discord server
- Create/use
#commitsand#deploymentschannels - For each channel:
- Settings → Integrations → Webhooks
- New Webhook
- Copy URL
- Save to GitHub secrets
2. Add GitHub Secrets
- Go to repo Settings → Secrets and variables → Actions
- Add:
DISCORD_WEBHOOK_COMMITS(from #commits webhook)DISCORD_WEBHOOK_DEV_DEPLOY(from #deployments webhook)DISCORD_WEBHOOK_PROD_DEPLOY(from #deployments webhook, can be same as dev)
- Delete old
DISCORD_WEBHOOK_URLwhen confirmed working
3. Test the Setup
- Push a test commit to
devbranch - Check:
- #commits channel shows commit notification ✅
- Next push to dev shows deployment notification in #deployments ✅
- Test missed commit recovery:
- Temporarily break webhook URL
- Push a commit (fails)
- Fix webhook URL
- Push another commit (should show both)
4. Update Documentation (Team)
- [ ] Document which channels are used for what
- [ ] Document who has access to what channels
- [ ] Add channel-specific notification rules if needed
Answers to Your Original Questions
1. Environment Variables & Secrets
✅ Answered: Each secret is added individually (e.g., VITE_FIREBASE_API_KEY_DEV). Values are copied from platform-specific dashboards (Cloudflare, Firebase, Discord) into GitHub Actions secrets.
2. CODECOV_TOKEN
✅ Answered: Optional code coverage reporting service. Currently non-blocking in your CI. Can skip or implement later.
3. Discord Channels
✅ Implemented: Created separate webhooks for #commits and #deployments with setup guide.
4. Commit History on Failed Deployments
✅ Implemented: Automatic tracking and retry system for missed Discord notifications. Next push automatically includes previous failed commits.
Files Changed Summary
Modified:
.github/workflows/discord-notify.yml ← Added tracking & recovery
.github/workflows/deploy-dev.yml ← New webhook name
.github/workflows/deploy-prod.yml ← New webhook name
.gitignore ← Ignore tracking file
docs/engineering/deployment/CICD_GUIDE.md
docs/engineering/deployment/BRANCH_PROTECTION_SETUP.md
Created:
docs/engineering/deployment/DISCORD_WEBHOOK_SETUP.md ← New setup guide