Check Course Availability #91
This file contains 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: Check Course Availability | |
on: | |
schedule: | |
- cron: '*/10 * * * *' # Runs every hour | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
check-courses: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Setup Chrome and ChromeDriver | |
uses: nanasess/setup-chromedriver@v2 | |
- name: Run course check script | |
env: | |
PUSHOVER_USER_KEY: ${{ secrets.PUSHOVER_USER_KEY }} | |
PUSHOVER_API_TOKEN: ${{ secrets.PUSHOVER_API_TOKEN }} | |
run: | | |
export DISPLAY=:99 | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | |
chromedriver --url-base=/wd/hub & | |
python register.py |