Email Scheduler #355
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: 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 }} |