Status Checker #550
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Status Checker | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Run daily at midday UTC | |
| workflow_dispatch: # Allow manual runs | |
| jobs: | |
| check-status: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Check services | |
| run: | | |
| node scripts/check-status.mjs | |
| - name: Commit and push | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email "actions@github.com" | |
| git add public/status.json | |
| git commit -m "Update status data" || echo "No changes to commit" | |
| git push |