This is a minimal Python project demonstrating logging and automated redeployment using GitHub Actions.
app.py: Main Python application that logs a timestamped message using the built-in logging modulerequirements.txt: Dependencies file (empty, as only built-in modules are used).github/workflows/deploy.yml: GitHub Actions workflow for automated deployment
- Logs a message with the current UTC datetime using Python's logging module
- Automatically runs on pull request merges to main branch
- Supports configurable cron-based scheduling (currently hourly)
- No external dependencies beyond Python standard library
- Ensure Python 3.11+ is installed
- Run the application:
python app.py
The workflow triggers on:
- Push to
mainbranch (e.g., merged pull requests) - Hourly schedule (configurable in
.github/workflows/deploy.yml)
To modify the schedule, edit the cron expression in the workflow file. Examples: DDDDD
'0 * * * *': Every hour'0 0 * * *': Daily at midnight UTC