This document describes the GitHub Actions workflows that power the profile automation system.
The repository uses a unified orchestration workflow (build-profile.yml) that consolidates all profile updates into a single cohesive pipeline. This replaced the previous architecture of 8+ separate workflows.
Migration Note: The old separate workflows were consolidated in December 2024. See UNIFIED_WORKFLOW_MIGRATION.md for details.
File: .github/workflows/build-profile.yml
The main workflow that handles all profile updates in a single orchestrated pipeline.
- Cron:
0 6 * * *(Daily at 6 AM UTC) - Manual:
workflow_dispatch - Push: On commits to
main/master
- Setup - Environment, dependencies, and caching
- Fetch All Data - Developer stats, Weather, Location, SoundCloud, Oura health
- Validate Data - JSON schema validation and sanity checks
- Generate SVG Cards - All card types with fallback handling
- Optimize SVGs - SVGO compression with advanced configuration
- Update README - Inject all cards into appropriate sections
- Build Dashboard - React dashboard compilation and deployment
- Lint (Report-Only) - MegaLinter diagnostics without blocking
- Commit & Push - Atomic commit of all changes
- Build Summary - Comprehensive status report
- GitHub API (Developer statistics)
- Open-Meteo API (Weather data)
- Nominatim + Mapbox (Location data)
- SoundCloud web scraping (Latest track)
- Oura API (Health metrics)
developer/developer_dashboard.svg- Developer statistics cardweather/weather-today.svg- Current weather cardlocation/location-card.svg- Location map cardassets/soundcloud-card.svg- Latest SoundCloud track cardoura/health_dashboard.svg- Oura health metrics dashboardoura/mood_dashboard.svg- Oura mood analysis carddashboard-app/dist/- React dashboard build (deployed to GitHub Pages)
- All steps use
continue-on-error: truewhere appropriate - Failed data fetches fall back to cached data
- Failed card generation produces fallback SVG cards
- Failed validations log warnings but continue
- Never blocks on partial errors
GITHUB_TOKEN- Automatically provided (GitHub API access)OURA_PAT- Oura API Personal Access Token (optional)MAPBOX_TOKEN- Mapbox API token (optional)
File: .github/workflows/monitoring.yml
Monitors workflow health and creates automated alerts for failures.
- Cron:
0 * * * *(Every hour) - Workflow Run: Triggers after
build-profile.ymlcompletion - Manual:
workflow_dispatch - Push: On commits to
main/master
- Generates status page (
data/status/status-page.svg) - Tracks workflow metrics (run times, success rates, consecutive failures)
- Automatically creates issues for repeated failures (3+ consecutive)
- Logs MegaLinter results when applicable
data/status/status-page.svg- Visual status dashboarddata/metrics/*.json- Workflow metrics files- GitHub Issues for persistent failures
File: .github/workflows/tests.yml
Runs Python and shell script tests to validate code changes.
- Push: On commits to
main/masteraffecting test files or scripts - Pull Request: On PRs to
main - Manual:
workflow_dispatch
- Python Tests - Type checking with mypy and pytest tests
- Shell Script Tests - Retry logic, health checks, and cache tests
concurrency:
group: profile-update
cancel-in-progress: falseThe build-profile.yml workflow uses this concurrency group to ensure only one profile update runs at a time, preventing git conflicts and race conditions.
The unified workflow requires these permissions:
permissions:
contents: write # Push commits, update files
pages: write # Deploy to GitHub Pages
id-token: write # GitHub Pages deployment
issues: write # Create monitoring issues
pull-requests: write # Comment on PRs (MegaLinter)The workflow implements multi-level caching:
- Pip Cache - Python package caching (60-75% faster setup)
- NPM Cache - Node.js package caching
- SVG Hash Cache - Incremental generation optimization
- Data Cache - Fallback for failed API calls
All cards and data updated in a single commit, ensuring consistency.
- No single point of failure
- Graceful degradation with fallbacks
- Continues on partial errors
- One workflow file instead of 8+
- Centralized configuration
- Easier to understand and modify
- Sequential phases with clear dependencies
- Proper data flow between steps
- Consolidated setup and teardown
- All logs in one workflow run
- Comprehensive build summary
- Clear phase separation
- Single environment setup
- Shared caching across operations
- Reduced GitHub Actions usage
The following workflows were consolidated into build-profile.yml:
developer.yml- Developer Dashboardsoundcloud-card.yml- SoundCloud Cardweather.yml- Weather Cardlocation-card.yml- Location Cardoura.yml- Oura Health Dashboardparallel-fetch.yml- Parallel Data Fetchingmegalinter.yml- Code Lintingdeploy-dashboard.yml- React Dashboard Deployment
These workflows were removed during the December 2024 repository cleanup. They can be found in the Git history if needed.
You can manually trigger the build profile workflow:
- Go to the Actions tab
- Select "Build Profile — Unified Orchestration Pipeline"
- Click "Run workflow"
- Select the branch (usually
main) - Click "Run workflow"
The workflow automatically runs:
- Daily at 6 AM UTC (scheduled)
- On every push to
main/master - When related files are modified
- Go to the Actions tab
- Click on a workflow run to see details
- Expand steps to view logs
- Check the "Build Summary" step for overall status
Logs are committed to the repository in the logs/ directory:
logs/
├── developer/ # Developer stats fetching logs
├── weather/ # Weather data fetching logs
├── location/ # Location data fetching logs
├── soundcloud/ # SoundCloud data fetching logs
├── oura/ # Oura health data fetching logs
└── megalinter/ # MegaLinter diagnostic reports
The workflow uploads these artifacts:
- megalinter-reports - Full MegaLinter analysis (30 day retention)
- pages-artifact - Built React dashboard (GitHub Pages deployment)
If the unified workflow fails:
- Check the Build Summary - Shows which phases succeeded/failed
- Review Phase Logs - Expand failed steps to see error messages
- Check Repository Logs - Look in
logs/directory for detailed logs - Verify Secrets - Ensure required secrets are configured
- Check API Status - Verify external APIs (GitHub, Oura, Mapbox) are operational
- Symptom: Card shows "Unavailable" message
- Solution: Check API rate limits, verify secrets, review logs in
logs/directory - Note: Workflow continues with cached data
- Symptom: Fallback card displayed
- Solution: Check script logs, verify data format, ensure dependencies installed
- Note: Workflow continues with fallback cards
- Symptom: Dashboard not updated on GitHub Pages
- Solution: Check npm build logs, verify data files copied, review Pages deployment
- Note: Workflow continues and commits other changes
- Symptom: Linting warnings in logs
- Solution: Review MegaLinter reports in artifacts or
logs/megalinter/ - Note: MegaLinter runs in report-only mode and never fails workflow
- Check TROUBLESHOOTING.md for common issues
- Review UNIFIED_WORKFLOW_MIGRATION.md for architecture details
- Create an issue for persistent problems
- Review workflow run logs for specific error messages
The unified workflow typically takes:
- Full Run: 8-12 minutes (all phases)
- With Cache Hits: 5-8 minutes
- Incremental Generation: 3-5 minutes (no card changes)
Performance optimizations:
- Pip caching (60-75% faster Python setup)
- NPM caching (faster dashboard builds)
- SVG hash caching (50-80% time savings on unchanged data)
- Parallel SVG optimization
- UNIFIED_WORKFLOW_MIGRATION.md - Migration guide and architecture
- TROUBLESHOOTING.md - Common issues and solutions
- MONITORING.md - Monitoring and alerting system
- WORKFLOW_CACHING.md - Caching strategy and optimization
- cards.md - Card generation and customization
- architecture.md - System architecture overview