Skip to content

Commit

Permalink
Merge pull request #74 from OpenSourceWin/fix-ci
Browse files Browse the repository at this point in the history
Fix ci
  • Loading branch information
shuashuai authored Oct 9, 2024
2 parents 68d3da6 + bd795ab commit 0600b51
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/sync-ranking-data-by-month.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ name: Monthly Script Runner
# 触发条件:每月的1号运行
on:
schedule:
- cron: "0 0 0 * *" # 每月一号的00:00 UTC时间运行
- cron: "0 0 1 * *" # 每月一号的00:00 UTC时间运行
workflow_dispatch:

jobs:
run-scripts:
runs-on: ubuntu-latest

steps:
# 检出代码
- name: Checkout repository
uses: actions/checkout@v4

# 设置 Node.js 环境
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # 使用 Node.js 18
node-version: '20'

# 运行第一个脚本 sync_xlab.js,从接口获取最新数据
- name: Run sync_xlab.js
Expand All @@ -44,24 +42,4 @@ jobs:
git commit -m "chore: Automated data update from scripts"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# # 创建并推送 PR
# - name: Create Pull Request
# id: create_pr
# uses: peter-evans/create-pull-request@v7
# with:
# commit-message: "chore: Updating data from xlab"
# title: "chore: Updating data from xlab"
# body: "Updating data from xlab,and create user homepages"
# branch: update-ranking-data
# base: "main"
# delete-branch: true

# # 启用自动合并
# - name: Enable auto-merge
# uses: peter-evans/enable-pull-request-automerge@v3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }}
# merge-method: merge
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0600b51

Please sign in to comment.