-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 974 Bytes
/
EmailScheduler.yml
File metadata and controls
36 lines (30 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Email Scheduler
on:
schedule:
- cron: '30 2 * * *' # Run at 2:30 AM UTC daily (8:00 AM in India)
workflow_dispatch: # Allowing manual triggering
jobs:
run-email-sender:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v2
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# Step 3: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install beautifulsoup4 requests python-dotenv
# Step 5: Run HackerNewEmail.py
- name: Run HackerNewEmail.py
run: |
python "Automation_&_WebScrapping/HackerNewEmail.py"
env:
FROMEMAIL: ${{ secrets.FROMEMAIL }}
TOEMAIL: ${{ secrets.RECIPIENTS }}
PASSWORD: ${{ secrets.PASSWORD }}