Skip to content

Send Daily Email

Send Daily Email #396

Workflow file for this run

name: Send Daily Email
on:
schedule:
- cron: '0 14 * * *' # Schedule to run daily at 9 am CST
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
EMAIL_PASSWORD: "${{ secrets.EMAIL_PASSWORD }}"
R_EMAIL_ADDRESS: "${{ secrets.R_EMAIL_ADDRESS }}"
S_EMAIL_ADDRESS: "${{ secrets.S_EMAIL_ADDRESS }}"
steps:
- name: Check out code
uses: actions/checkout@v3
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install setuptools (for Python 3.12+)
run: pip install setuptools
- name: Cache Python packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: setup-chromedriver
uses: nanasess/[email protected]
- name: Change Directory & Run Python script
working-directory: postgrad_job_search/src/
run: |
python search.py