Update Blog Posts #199
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 Blog Posts | |
on: | |
push: | |
branches: | |
- main # 또는 워크플로우를 트리거하고 싶은 브랜치 이름 | |
schedule: | |
- cron: '40 10 * * *' # 매일 오전 10시 40분에 실행 | |
jobs: | |
update_blog: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Push changes | |
run: | | |
git config --global user.name 'GoldenPearls' | |
git config --global user.email 'prettylee620@naver.com' | |
git push https://${{ secrets.GH_PAT }}@github.com/GoldenPearls/velog.git #자신의 깃허브명으로 바꿔야 함 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install feedparser gitpython | |
- name: Run script | |
run: python scripts/update_blog.py |