Cập nhật nội dung #106
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: Cập nhật nội dung | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- 'events/tournaments/**.txt' | |
schedule: | |
- cron: "59 */100 * * *" | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
jobs: | |
updates: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.TOKEN }} | |
- name: Thiết lập Python '3.11' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Cài đặt dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Cập nhật nội dung | |
run: | | |
python3 python/api2md.py | |
python3 python/md2html_tournaments.py | |
python3 python/md2html_bestplayers.py | |
python3 python/update_time.py | |
- name: Cam kết & Đẩy tệp | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Thi-Vua-Lay-Tot" | |
git add -A | |
git commit -m "Update contents" | |
git push --force |