Birthday Discord Bot #131
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: Birthday Discord Bot | |
| on: | |
| schedule: | |
| # Always runs before midnight Melbourne time (AEST/AEDT): | |
| # - 13:00 UTC = 23:00 (midnight) in AEST (winter) | |
| # - 13:00 UTC = 00:00 in AEDT (summer) | |
| # This ensures the workflow runs before midnight and allows code to decide whether to send notifications based on the current date in Melbourne. | |
| - cron: '0 13 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| run-birthday-bot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run birthday bot | |
| env: | |
| NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
| DATABASE_ID: ${{ secrets.DATABASE_ID }} | |
| WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} | |
| HR_DISCORD_ID: ${{ secrets.HR_DISCORD_ID }} | |
| run: python main.py |