Substack Bot Automation #31
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: Substack Bot Automation | |
| on: | |
| schedule: | |
| # Run every weekday at 9:30 AM EST (2:30 PM UTC) | |
| - cron: '30 14 * * 1-5' | |
| workflow_dispatch: # Allow manual trigger | |
| inputs: | |
| run_immediately: | |
| description: 'Run the bot immediately' | |
| required: false | |
| default: 'true' | |
| type: boolean | |
| jobs: | |
| run-substack-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.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| playwright install chromium | |
| - name: Run Substack Bot | |
| env: | |
| SUBSTACK_COOKIE: ${{ secrets.SUBSTACK_COOKIE }} | |
| run: | | |
| python substack_bot.py |