This project includes automated systems to keep your website synchronized with your YouTube playlists.
The automation system monitors two YouTube playlists:
- Monthly Series:
PLbzgihkqSogoFQ4BNssbgdEJWQyU4C4Yo - Quantum AI Lab:
PLbzgihkqSogor2r6XvsjvdgFIO770L4BG
- Daily: Every day at 6 AM UTC, GitHub Actions checks for new videos
- Manual: You can trigger updates manually from the GitHub Actions tab
- On Push: Updates run when you modify the automation scripts
- Fetch Videos: Downloads latest video information from both playlists
- Create Pages: Generates individual episode pages for new videos
- Update Navigation: Adds new episodes to the website navigation
- Update Index: Refreshes series overview pages with new episodes
- Commit Changes: Automatically commits new content to the repository
- Deploy Site: Rebuilds and deploys the website to GitHub Pages
├── .github/workflows/
│ └── update-playlists.yml # GitHub Actions workflow
├── scripts/
│ └── update_playlists.py # Main automation script
├── update_playlists.sh # Manual update script
└── AUTOMATION.md # This documentation
If you want to update playlists manually:
./update_playlists.shThis will:
- Check both playlists for new videos
- Create pages for any new videos found
- Show you what changed
- Ask if you want to commit the changes
For advanced users:
source venv/bin/activate
cd scripts
python update_playlists.pyEdit scripts/update_playlists.py to modify playlist settings:
PLAYLISTS = {
'monthly-series': {
'playlist_id': 'PLbzgihkqSogoFQ4BNssbgdEJWQyU4C4Yo',
'directory': 'docs/monthly-series',
'nav_section': 'Monthly Series',
'series_name': 'Monthly Series'
},
'quantum-ai-lab': {
'playlist_id': 'PLbzgihkqSogor2r6XvsjvdgFIO770L4BG',
'directory': 'docs/quantum-ai-lab',
'nav_section': 'Quantum AI Lab',
'series_name': 'Quantum AI Lab'
}
}Edit .github/workflows/update-playlists.yml to change the update schedule:
schedule:
- cron: '0 6 * * *' # Daily at 6 AM UTC- Fetches playlist information from YouTube
- Extracts video titles, durations, and IDs
- Compares with existing episodes to find new content
- Creates comprehensive episode pages with:
- Embedded YouTube video player
- Episode summary and description
- Topic breakdown based on video title
- Community discussion sections
- Additional resources and next steps
- Adds new episodes to mkdocs.yml navigation
- Updates series overview pages
- Maintains chronological episode ordering
- Automatically generates topic lists based on video titles
- Creates contextual summaries and descriptions
- Adds relevant tags and metadata
- Schedule: Daily at 6 AM UTC
- Manual: Via GitHub Actions tab
- Push: When automation files are modified
contents: write- To commit new filespages: write- To deploy to GitHub Pagesid-token: write- For GitHub Pages deployment
No special environment variables or secrets are required. The workflow uses the default GITHUB_TOKEN.
- Go to your GitHub repository
- Click on the "Actions" tab
- Look for "Update YouTube Playlists" workflows
- Click on any run to see detailed logs
- ✅ Success: New videos found and processed
- ✅ Success (No Changes): No new videos, everything up to date
- ❌ Failure: Check logs for errors (usually network or parsing issues)
- Verify playlist IDs are correct
- Check if videos are actually public
- YouTube may have changed their page structure
- Check mkdocs.yml syntax
- Verify all required dependencies are installed
- Look for file permission issues
- Ensure GitHub Pages is enabled
- Check repository permissions
- Verify workflow has necessary permissions
To run the script with more verbose output:
cd scripts
python -u update_playlists.py- ✅ No Manual Work: Videos automatically appear on your website
- ✅ Consistent Format: All episodes follow the same professional structure
- ✅ SEO Optimized: Each page includes proper metadata and descriptions
- ✅ Always Current: Website stays synchronized with your YouTube content
- ✅ Fresh Content: New episodes appear within 24 hours
- ✅ Rich Experience: More than just embedded videos - full episode guides
- ✅ Easy Navigation: Chronological ordering and clear episode structure
- ✅ Mobile Friendly: Responsive design works on all devices
Potential improvements to consider:
- Webhook Integration: Instant updates when videos are published
- Video Transcripts: Automatic transcript generation and inclusion
- Social Media: Auto-post to social media when new episodes are added
- Analytics: Track episode popularity and engagement
- Email Notifications: Notify subscribers of new episodes
This automation system ensures your quantum computing lecture archive stays current with minimal manual intervention!