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