diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4021dd4..930ce48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,8 @@ name: Run Python script and update image on: + schedule: + - cron: '0 3 * * *' # 每天凌晨3点运行 push: branches: - main # 或者你想要运行这个工作流的分支 @@ -16,7 +18,15 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.8 + + - name: Install Fontist + uses: fontist/setup-fontist@v1 + with: + fontist-token: ${{ secrets.GH_TOKEN }} + + - name: Install HYWenHei font + run: fontist install "HYWenHei" - name: Install dependencies run: | @@ -32,4 +42,4 @@ jobs: git config --local user.name "GitHub Action" git add . git diff --quiet && git diff --staged --quiet || git commit -m "Update image" - git push --allow-unrelated-histories + git push -f origin main