Skip to content

Update Video Data

Update Video Data #154

name: Update Video Data
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Check out code
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 requests pymysql
- name: Run script
run: python youtube_video_crawler.py
env:
MYSQL_HOST: ${{ secrets.MYSQL_HOST }}
MYSQL_PORT: ${{ secrets.MYSQL_PORT }}
MYSQL_USER: ${{ secrets.MYSQL_USER }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_DATABASE: ${{ secrets.MYSQL_DATABASE }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}