[#5] fix: Videos 테이블 기본키 중복 발생 가능성 제거 #3
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 */12 * * *" | |
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 }} |