name: User Flair Usage Stats on: schedule: # Runs every day at 3:30 PM UTC (9 PM IST) - cron: '30 15 * * *' workflow_dispatch: jobs: send_discord_message: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Python 3.10 uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Get Stats env: REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }} REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }} REDDIT_PASSWORD: ${{ secrets.REDDIT_PASSWORD }} REDDIT_USERNAME: ${{ secrets.REDDIT_USERNAME }} DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} run: | cd user-flair-usage python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi python main.py