File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Substack Bot Automation
2+
3+ on :
4+ schedule :
5+ # Run every weekday at 9:30 AM EST (2:30 PM UTC)
6+ - cron : ' 30 14 * * 1-5'
7+ workflow_dispatch : # Allow manual trigger
8+ inputs :
9+ run_immediately :
10+ description : ' Run the bot immediately'
11+ required : false
12+ default : ' true'
13+ type : boolean
14+
15+ jobs :
16+ run-substack-bot :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Set up Python
24+ uses : actions/setup-python@v4
25+ with :
26+ python-version : ' 3.11'
27+
28+ - name : Install dependencies
29+ run : |
30+ python -m pip install --upgrade pip
31+ pip install -r requirements.txt
32+ playwright install chromium
33+
34+ - name : Run Substack Bot
35+ env :
36+ SUBSTACK_EMAIL : ${{ secrets.SUBSTACK_EMAIL }}
37+ SUBSTACK_PASSWORD : ${{ secrets.SUBSTACK_PASSWORD }}
38+ run : |
39+ python substack_bot.py
40+
41+ - name : Upload logs (if failure)
42+ if : failure()
43+ uses : actions/upload-artifact@v3
44+ with :
45+ name : bot-logs
46+ path : |
47+ *.log
48+ screenshots/
49+ retention-days : 7
You can’t perform that action at this time.
0 commit comments