Upload daily velog posts #59
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: Upload daily velog posts | |
on: | |
workflow_dispatch: # 수동 실행 트리거 | |
schedule: | |
- cron: '0 17 * * *' # 매일 UTC 오후 5시 (KST 새벽 2시) | |
jobs: | |
upload_daily_velog_posts: | |
runs-on: ubuntu-latest | |
steps: | |
# 리포지토리 체크아웃 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Git Config 설정 | |
- name: Set up Git | |
# TODO github id, email, repository 설정 | |
run: | | |
git config --global user.name 'dlgocks1' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://dlgocks1:${{ secrets.GH_PAT }}@github.com/dlgocks1/Study-Velog-Post-Collections.git | |
# 원격 변경 사항을 로컬에 적용 | |
- name: Pull changes from remote | |
run: | | |
git pull --rebase origin main | |
# Python 3.9 설정 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
# 필요한 Python 의존성 설치 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install feedparser gitpython requests | |
# Python 스크립트 실행 | |
- name: Run script | |
env: | |
# TODO velog_name 설정 | |
VELOG_ID: "cksgodl" | |
run: | | |
python ./scripts/post_daliy_velog_posts_by_series/main.py |