Update Video Data #216
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: 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 | |
pip install cryptography | |
- 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 }} |