How nathan-pro-fr/discord_github_action works
Discord Media Gallery is a static image/video gallery whose dataset is refreshed from a Discord channel by an automated or manually triggered sync. The workflow coordinates collection, statistics, and success or failure notifications; the browser loads the generated JSON and renders media with a modal. A service worker adds caching for the site shell and prioritizes fresh gallery data. Workflow relationships are based on the README’s documented sequence; the workflow file and page markup were not sampled, so their internal wiring is not independently verified.
Main entry points: sync_discord.yml Sync workflow · donnees.json Media URL dataset · recupere_medias.js Discord collector · index.html Gallery page
Components 14
Sync automation
- Sync workflow
.github/workflows/sync_discord.yml - Discord collector
recupere_medias.js - Sync statistics
calcul_stats.js
Media data
- Media URL dataset
donnees.json
Gallery frontend
- Gallery page
index.html - Media renderer
script.js - Gallery styling
css/style.css - Cache handler
sw.js
Notifications
- Sync notifier
envoi_webhook.js - Failure alert
notif_erreur_mp.js
Other components
- Gallery visitor
- Discord channel API
- Discord webhook
- Discord direct messages
Connections 14
- Sync workflow → Discord collector: runs sync
README.md - Discord collector → Discord channel API: fetches messages
recupere_medias.js - Discord collector → Media URL dataset: writes URLs
recupere_medias.js - Sync workflow → Sync statistics: runs stats
README.md - Sync statistics → Media URL dataset: compares data
calcul_stats.js - Sync workflow → Sync notifier: runs notifier
README.md - Sync notifier → Discord webhook: posts summary
envoi_webhook.js - Sync workflow → Failure alert: alerts on failure
README.md - Failure alert → Discord direct messages: sends alert
notif_erreur_mp.js - Gallery visitor → Gallery page: opens gallery
- Gallery page → Media renderer: loads frontend
README.md - Media renderer → Media URL dataset: fetches URLs
script.js - Gallery page → Gallery styling: uses styling
- Cache handler → Media URL dataset: caches data
sw.js