A simple web application for testing GitHub Actions cron workflows and automated deployments.
This project demonstrates:
- Daily automated merging from
devtomainbranch - Build verification before merging
- Simple web app that can be easily broken for testing
The GitHub Action runs daily at 06:00 UTC and:
- Checks out the
devbranch - Runs
npm run buildto verify the build works - Creates a PR from
devtomain(if changes exist) - Auto-merges the PR if the build passes
# Install dependencies (none currently)
npm install
# Build the app
npm run build
# Run the server
npm start
# Visit http://localhost:3000To test the workflow with build failures, uncomment the error line in build.js:
// throw new Error('Simulated build failure for testing');This will cause the build to fail and prevent the merge to main.
main: Production branch, only receives merges from devdev: Development branch, where new changes are made
The workflow uses 0 6 * * * which means:
0- At minute 06- At hour 6 (06:00 UTC)*- Every day of month*- Every month*- Every day of week
Change this to test different schedules (e.g., */5 * * * * for every 5 minutes).